-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (43 loc) · 1.29 KB
/
contract-tests.yaml
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
name: Contract tests
on: [push]
concurrency:
# limit concurrency of entire workflow runs for a specific branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
contract_tests:
name: Contract tests
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- uses: pnpm/action-setup@v4
- name: Set Node Version
uses: actions/setup-node@v3
with:
node-version: 22.1.0
cache: "pnpm"
- name: Install dependencies
run: pnpm install
working-directory: ./contracts
- name: Type checks
run: pnpm typecheck
working-directory: ./contracts
- name: Tests
run: pnpm test
working-directory: ./contracts
- name: Lint
run: pnpm lint
working-directory: ./contracts
- name: Generate contract docs and types
run: pnpm build
working-directory: ./contracts
- name: Ensure git is clean
id: gitStatus
run: git diff --no-ext-diff --exit-code
continue-on-error: true
- name: Error message if git is dirty
if: steps.gitStatus.outcome == 'failure'
run: |
echo "::error::Git is dirty. Make sure you ran \`make build\` before pushing."
exit 1