-
Notifications
You must be signed in to change notification settings - Fork 75
79 lines (71 loc) · 2.22 KB
/
build-and-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
76
77
78
79
name: Build and Test
run-name: Build and Test
on:
push:
branches:
- main
pull_request:
branches:
- "**"
merge_group:
# https://docs.github.com/en/actions/using-jobs/using-concurrency#example-using-concurrency-and-the-default-behavior
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
Build-and-Test:
env:
CIRCOM_VERSION: v2.1.8
TURBO_TEAM: ${{ secrets.TURBO_TEAM }}
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
runs-on:
labels: ubuntu-latest-l
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: password
POSTGRES_USER: admin
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 200ms
--health-timeout 200ms
--health-retries 10
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: "yarn"
- name: Cache circom and cargo
uses: actions/cache@v3
id: cache-circom
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
cibuild/circom/
key: ${{ runner.os }}-circom-${{ env.CIRCOM_VERSION }}
- name: "Install circom (if not cached)"
if: ${{ steps.cache-circom.outputs.cache-hit != 'true' }}
run: "scripts/ci/install_circom.sh $CIRCOM_VERSION"
- name: "Add cached circom to PATH (if cached)"
if: ${{ steps.cache-circom.outputs.cache-hit == 'true' }}
run: "echo '~/.cargo/bin' >> $GITHUB_PATH"
- run: "yarn install"
- name: "Check that yarn install did not cause changes to yarn.lock"
run: "git diff --quiet -- yarn.lock"
- run: "yarn check-references"
- run: "yarn build"
- run: "yarn lint"
- run: "yarn test:ci"
- name: "Test that template package works out-of-the-box"
run: "yarn turbo run test-generated-package --filter='//'"