-
Notifications
You must be signed in to change notification settings - Fork 3
59 lines (47 loc) · 1.25 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
name: CI
on:
workflow_call:
secrets:
CODECOV_TOKEN:
description: Code coverrage token
required: true
jobs:
tests:
timeout-minutes: 10
name: "Tests"
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version: 20
- uses: actions/cache@v3
with:
path: |
**/node_modules
.yarn/install-state.gz
.yarn/cache
~/.cache
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: yarn-
- name: Install dependencies
run: yarn install
- name: Make sure to use same dependencies version across all packages
run: yarn dedupe --check
- name: lint
run: yarn lint
- name: typecheck
run: yarn typecheck:ci
- name: start mongodb service
run: |
docker compose up --build -d --wait mongodb
yarn setup:mongodb
- name: test
run: yarn test:ci
- name: prettier
run: yarn prettier:check
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}