-
Notifications
You must be signed in to change notification settings - Fork 0
66 lines (53 loc) · 1.48 KB
/
build.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
60
61
62
63
64
65
66
name: Build
on:
push:
branches: [dev, main]
pull_request:
branches: [dev, main]
env:
NODE_VERSION: 18.18.0
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
name: Build
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Install moreutils
run: sudo apt install moreutils
# https://github.com/actions/virtual-environments/issues/1187
- name: tune linux network
run: sudo ethtool -K eth0 tx off rx off
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
- name: Checkout
uses: actions/checkout@v4
- name: get yarn cache directory
id: cache
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
shell: bash
working-directory: ./
- name: setup yarn cache
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.cache.outputs.dir }}
key: yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
yarn-
- name: install yarn
run: corepack enable
- name: Install dependencies
run: yarn
- name: format:check
run: yarn format:check
- name: lint
run: yarn lint
- name: jest
run: yarn test
- name: tsc
run: yarn tsc