-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (48 loc) · 1.39 KB
/
playwright-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
name: Checks
on:
workflow_call:
inputs:
node-version:
default: 18.x
required: false
type: string
jobs:
playwright-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: TLS setup
run: |
sudo apt update
sudo apt install -y libnss3-tools
mkdir -p $HOME/.pki/nssdb
certutil -d sql:$HOME/.pki/nssdb -N --empty-password
curl -JL "https://dl.filippo.io/mkcert/latest?for=linux/amd64" -o mkcert
chmod +x mkcert
sudo cp ./mkcert /usr/local/bin/
sudo mkcert -install
- name: Use Node.js ${{ inputs.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ inputs.node-version }}
cache: yarn
- name: Restore Build Cache
id: restore-build-cache
uses: actions/cache/restore@v3
with:
path: ./build
key: ${{ runner.os }}-${{ github.sha }}-build
- name: Install
run: |
yarn install --immutable
yarn tls:config
- name: Install Playwright
run: yarn playwright install --with-deps
- name: Run your tests
run: yarn test:e2e
- name: Upload test results
if: always()
uses: actions/upload-artifact@v3
with:
name: playwright-report
path: playwright-report