Skip to content

Commit

Permalink
Draft action
Browse files Browse the repository at this point in the history
  • Loading branch information
martinRenou committed Jan 24, 2022
1 parent 40ffcc7 commit 0e90d0d
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/update_references.yaml
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'

0 comments on commit 0e90d0d

Please sign in to comment.