-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (41 loc) · 1.29 KB
/
main.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
name: CI
on: [push, pull_request]
jobs:
main:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x, 22.x]
steps:
- name: Checkout
uses: actions/checkout@v2
# Create a main branch for commitlint
# https://github.com/conventional-changelog/commitlint/issues/6
- run: git remote set-branches origin main && git fetch
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install required packages
# add required dependencies for webkit, chromium and firefox (playwright)
run: |
sudo apt-get update
npx --yes playwright install-deps
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v2
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
- name: Setup
env:
NODE_ENV: development
run: |
yarn install --frozen-lockfile
(cd packages/one-service-worker-demo && yarn install --frozen-lockfile)
npx playwright install-deps
- name: Testing
env:
TEMP_DIR: ${{ runner.temp }}
run: yarn test