Skip to content

Commit ab4258c

Browse files
add a daily regression run
1 parent 46e2fc8 commit ab4258c

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Daily run of P0 tests
2+
3+
on:
4+
schedule:
5+
- cron: '0 8 * * 1-5'
6+
workflow_dispatch:
7+
8+
jobs:
9+
run-daily-p0-tests:
10+
timeout-minutes: 30
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
project: [chromium, firefox, webkit, mobile-chrome, mobile-safari]
15+
fail-fast: false
16+
steps:
17+
- name: Checkout code
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Node.js and Playwright
21+
uses: ./.github/actions/setup-playwright
22+
23+
- name: List tests to run
24+
id: list-tests
25+
run: |
26+
TEST_LIST=$(yarn playwright test --project=${{ matrix.project }} --grep @regression --list || echo '')
27+
echo "has_tests=$([ -n "$TEST_LIST" ] && echo 'true' || echo 'false')" >> $GITHUB_OUTPUT
28+
29+
- name: Run tests
30+
if: ${{ steps.list-tests.outputs.has_tests == 'true' }}
31+
run: yarn playwright test --project=${{ matrix.project }} --grep @regression
32+
33+
- name: Set date variable
34+
if: ${{ !cancelled() }}
35+
id: date
36+
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
37+
38+
- name: Upload test results
39+
if: ${{ !cancelled() }}
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: regression-tests-results-${{ steps.date.outputs.date }}-${{ matrix.project }}-${{ github.run_id }}-${{ github.run_attempt }}
43+
path: playwright-report/
44+
retention-days: 30

0 commit comments

Comments
 (0)