Merge pull request #1 from dragid10/fix-playwright-tests #3
This file contains hidden or 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: Playwright Tests | |
# https://devblogs.microsoft.com/python/announcing-playwright-for-python-reliable-end-to-end-testing-for-the-web/ | |
# https://github.com/marketplace/actions/run-playwright-tests | |
on: | |
push: | |
branches: | |
- gh-pages | |
pull_request: | |
branches: | |
- gh-pages | |
workflow_dispatch: | |
jobs: | |
test: | |
timeout-minutes: 15 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements-dev.txt | |
python -m playwright install --with-deps | |
- name: Set up Ruby | |
uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Jekyll detached and pytest | |
run: | | |
# Start up local copy of site | |
bundle exec jekyll serve --detach | |
# Sleep for 5 secs to allow Jekyll to start | |
startup_wait=5 | |
echo "Sleeping for $startup_wait seconds" | |
sleep $startup_wait | |
# Run tests | |
python -m pytest tests --tracing on --tracing=retain-on-failure | |
- uses: actions/upload-artifact@v4 | |
name: Upload test results | |
if: always() | |
with: | |
name: playwright-traces | |
path: ./test-results/ |