-
Notifications
You must be signed in to change notification settings - Fork 36
69 lines (59 loc) · 1.83 KB
/
integration-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Integration Tests
on:
push:
branches:
- 'master'
pull_request:
branches:
- '**'
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
include:
- { wp: 40, php: 56 }
- { wp: 40, php: 70 }
- { wp: 57, php: 73 }
- { wp: 60, php: 73 }
- { wp: 63, php: 80 }
- { wp: 67, php: 82 }
- { wp: 67, php: 83 }
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: 'npm'
- name: Cache node_modules
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install dependencies
run: npm ci
- name: Get installed Playwright version
id: playwright-version
run: echo "PLAYWRIGHT_VERSION=$(node -e "console.log(require('./package-lock.json').dependencies['@playwright/test'].version)")" >> $GITHUB_ENV
- name: Cache Playwright
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- run: npx playwright install --with-deps
if: steps.playwright-cache.outputs.cache-hit != 'true'
- name: Run script
run: ./bin/integration-tests ${{ matrix.wp }} ${{ matrix.php}}
- uses: actions/upload-artifact@v4
if: ${{ !cancelled() }}
with:
name: playwright-report-${{ matrix.wp }}-${{ matrix.php }}
path: playwright-report/
retention-days: 30