generated from ChainSafe/yarn-workspaces-typescript-template
-
Notifications
You must be signed in to change notification settings - Fork 3
40 lines (34 loc) · 1.02 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
name: 'ci / test'
on:
push:
branches:
- main # runs on push to master, add more branches if you use them
pull_request:
branches:
- '**' # runs on update to pull request on any branch
concurrency:
group: ci-${{ github.ref || github.run_id }}
cancel-in-progress: true
jobs:
# most basic test job
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- run: corepack enable
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Yarn cache
id: yarn-cache
uses: actions/cache@v3
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-cache
- run: yarn install --immutable # install dependencies
- run: yarn run build # compile typescript into javascript
- run: yarn run lint # lint code
- run: yarn run test # run tests