-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (37 loc) · 1.11 KB
/
test.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 tests
on:
push:
branches:
- "main"
merge_group:
pull_request:
jobs:
test:
timeout-minutes: 20
runs-on: ubuntu-latest
concurrency:
group: storybook-tests-${{ github.head_ref || github.ref }}
# we do not cancel the workflows in progress as the runs are quite fast.
cancel-in-progress: false
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install dependencies
run: yarn
- name: Check code style and linting
run: yarn prettier:check && yarn lint
- name: Build # ensures type-checks and compiles
run: yarn build
- name: Get Latest playwright version
run: echo "PLAYWRIGHT_VERSION=$(npm show playwright version)" >> $GITHUB_ENV
- name: Cache playwright binaries
uses: actions/cache@v4
id: playwright-cache
with:
path: |
~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Install playwright
run: npx playwright install --with-deps
- name: Test
run: yarn test