-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40ffcc7
commit 0e90d0d
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: Update references | ||
|
||
on: | ||
issue_comment: | ||
types: [created, edited] | ||
|
||
|
||
jobs: | ||
update_references: | ||
|
||
name: PR comment | ||
if: ${{ github.event.issue.pull_request && contains(github.event.comment.body, 'Please generate reference screenshots') }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
os: [ubuntu-latest, windows-latest, macos-latest] | ||
python-version: ['3.7', '3.10'] | ||
steps: | ||
|
||
- name: Checkout branch | ||
uses: actions/checkout@v2 | ||
- name: Setup Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Print basic Python info | ||
shell: python | ||
run: | | ||
import sys | ||
print(sys.executable, sys.version, sep='\n') | ||
- name: Install baseline deps | ||
run: python -m pip install --upgrade pip setuptools wheel | ||
- name: Install build deps | ||
run: python -m pip install --upgrade --upgrade-strategy eager build pip setuptools wheel | ||
- name: Build package | ||
run: python -bb -X dev -W error -m build | ||
- name: Install wheel | ||
shell: bash | ||
run: 'echo dist/*.whl | xargs -I % python -bb -X dev -W error -W ignore::DeprecationWarning:pip._internal.locations._distutils -W ignore::DeprecationWarning:distutils.command.install -m pip install --upgrade %[test]' | ||
- name: List packages in environment | ||
run: pip list | ||
- name: Install Firefox | ||
run: python -m playwright install firefox | ||
- name: Run tests | ||
shell: bash | ||
run: python -I -bb -X dev -W error -m pytest --generate-reference-screenshots | ||
- uses: EndBug/add-and-commit@v8 | ||
with: | ||
add: docrepr/tests/references | ||
message: 'Update references' |