-
Notifications
You must be signed in to change notification settings - Fork 8
75 lines (58 loc) · 1.6 KB
/
test.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
67
68
69
70
71
72
73
74
75
name: Test CI
on:
push:
branches:
- '**'
permissions:
contents: read # to fetch code (actions/checkout)
env:
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout Commit
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Install pnpm
uses: pnpm/action-setup@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Install Protoc
run: |
PB_REL="https://github.com/protocolbuffers/protobuf/releases"
curl -LO $PB_REL/download/v22.2/protoc-22.2-linux-x86_64.zip
unzip protoc-22.2-linux-x86_64.zip -d $HOME/.local
export PATH="$PATH:$HOME/.local/bin"
- name: Check protoc installation
run: protoc --version
- name: pnpm install
run: pnpm install
- name: Setup turbo cache
env:
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_API: ${{ secrets.TURBO_API }}
run: node scripts/setupTurboCache.js
- name: Run build
run: pnpm build
- name: Run linter checks
run: pnpm lint:check
- name: Run perttier checks
id: prettier
run: pnpm pretty:check
continue-on-error: true
- name: Why did prettier fail?
if: steps.prettier.outcome != 'success'
run: |
pnpm pretty
git diff
exit 1
- name: Run tests
run: pnpm test