-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
44 lines (44 loc) · 1.1 KB
/
ci.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:
pull_request:
push:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
stage:
- unit
- storyshots
fail-fast: false
name: ${{ matrix.stage }} tests
steps:
- name: Checkout the repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 7
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test:${{ matrix.stage }}
- name: Collect coverage
uses: codecov/codecov-action@v3
if: "success() && matrix.stage == 'unit'"
with:
files: ./coverage/lcov.info
fail_ci_if_error: true
- name: Collect artifacts
uses: actions/upload-artifact@v3
if: "failure() && matrix.stage != 'unit'"
with:
name: Image snapshots (${{ matrix.stage }})
path: test/__image_snapshots__/