Merge pull request #6 from ErikWegner/axum-0.8 #1
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: Playwright Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run devcontainers, build binary | |
run: | | |
docker compose -f .devcontainer/docker-compose.yml up -d | |
docker compose -f .devcontainer/docker-compose.yml exec ridser /bin/bash -c "rustup update stable" | |
docker exec -i --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cargo build" | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Install dependencies | |
working-directory: ./tests | |
run: npm ci | |
- name: Install Playwright Browsers | |
working-directory: ./tests | |
run: npx playwright install --with-deps | |
- name: Run Playwright tests | |
working-directory: ./tests | |
run: | | |
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cp .env.default .env ; cargo run" | |
export PLAYWRIGHT_HTML_OUTPUT_DIR=playwright-report/firefox_chromium/ | |
npx playwright test --project firefox --project chromium | |
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "killall ridser" | |
docker exec -id --user ${UID}:${GID} --workdir /workspace devcontainer-ridser-1 /bin/bash -c "cp .env.e2e-ci .env ; cargo run" | |
export PLAYWRIGHT_HTML_OUTPUT_DIR=playwright-report/webkit/ | |
npx playwright test --project webkit | |
- uses: actions/upload-artifact@v4 | |
if: ${{ !cancelled() }} | |
with: | |
name: playwright-report | |
path: tests/playwright-report/ | |
retention-days: 30 |