-
Notifications
You must be signed in to change notification settings - Fork 6
45 lines (45 loc) · 1.16 KB
/
unit.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
on:
push:
branches:
- main
paths:
- src/**
pull_request:
types: [opened, synchronize, reopened]
jobs:
tests:
runs-on: ubuntu-latest
name: Tests
if: |
(
!contains(github.event.head_commit.message, '[skip ci]') &&
!contains(github.event.head_commit.message, 'version bump')
)
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8.11
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
cache: 'pnpm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: pnpm install
- name: Run tests
run: pnpm test
- name: Upload artifacts
uses: actions/upload-artifact@v2
if: failure()
with:
name: unit-tests
path: ${{ github.workspace }}/coverage/
retention-days: 5
- uses: codecov/codecov-action@v1.3.1
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ${{ github.workspace }}/coverage/