Refs #34043 -- Added GitHub action to capture screenshots in Selenium tests. #5
Workflow file for this run
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
name: Admin UI | |
on: | |
pull_request: | |
types: [ labeled, synchronize, opened, reopened ] | |
permissions: | |
contents: read | |
jobs: | |
Run_admin_ui_tests: | |
if: contains(github.event.pull_request.labels.*.name, 'enhancement') | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: 'extras/django_ui/requirements.txt' | |
- name: Install and upgrade packaging tools | |
run: python -m pip install --upgrade pip setuptools wheel | |
- run: | | |
python -m pip install -r extras/django_ui/requirements.txt -e . | |
playwright install | |
- name: Run Admin UI test against latest | |
working-directory: ./extras/django_ui/ | |
run: python manage.py test | |
- name: Take screenshots of pages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots-of-new-pages | |
path: extras/django_ui/test-results/ | |
- run: python -m pip install Django | |
- name: Run Admin UI test last released version | |
working-directory: ./extras/django_ui/ | |
run: python manage.py test | |
- name: Take screenshots of pages | |
uses: actions/upload-artifact@v3 | |
with: | |
name: screenshots-of-previous-pages | |
path: extras/django_ui/test-results/ |