-
Notifications
You must be signed in to change notification settings - Fork 10
60 lines (52 loc) · 1.51 KB
/
build-and-lint.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
name: Build and lint
on:
push:
jobs:
build-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- uses: pnpm/action-setup@v2
with:
version: 9
run_install: false
- uses: actions/setup-go@v4
with:
go-version-file: go.work
cache-dependency-path: '**/*.sum'
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: pnpm/action-setup@v3
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup turborepo cache
uses: dtinth/setup-github-actions-caching-for-turbo@v1
- name: Install dependencies
run: |
pnpm cli deps --skip-node --skip-go
pnpm install
- name: Build
run: pnpm cli build
# - name: Lint javascript
# run: pnpm run lint
# - name: golangci-lint
# uses: golangci/golangci-lint-action@v3
# with:
# version: v1.55.2