forked from sorry-cypress/sorry-cypress
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (38 loc) · 1.39 KB
/
tests.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
name: Lint and test
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
if: "!contains(toJSON(github.event.commits.*.message), '[skip ci]')"
steps:
- uses: actions/checkout@master
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v3
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: v1-${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
v1-${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
- name: Run lint
run: yarn lint
- name: Type check director
run: yarn workspace @sorry-cypress/director build:types
- name: Type check api
run: yarn workspace @sorry-cypress/api build:types
- name: Type check dashboard
run: yarn workspace @sorry-cypress/dashboard type-check
- name: Build common package
run: yarn workspace @sorry-cypress/common build
- name: Build logger package
run: yarn workspace @sorry-cypress/logger build
- name: Build mongo package
run: yarn workspace @sorry-cypress/mongo build
- name: Run unit tests
run: yarn test