-
Notifications
You must be signed in to change notification settings - Fork 14
73 lines (66 loc) · 1.85 KB
/
solidity.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
name: Solidity
on:
push:
branches:
- main
paths:
- "solidity/**"
pull_request:
types:
- opened
- synchronize
paths:
- "solidity/**"
- ".github/workflows/solidity.yml"
permissions:
contents: read
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true
jobs:
compile:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
check-latest: false
cache: "yarn"
cache-dependency-path: solidity/yarn.lock
- run: cd solidity && yarn install && yarn lint:sol && yarn compile
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
check-latest: false
cache: "yarn"
cache-dependency-path: solidity/yarn.lock
- run: cd solidity && yarn install && yarn test
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
check-latest: false
cache: "yarn"
cache-dependency-path: solidity/yarn.lock
- run: cd solidity && yarn install && yarn format:ts && git diff --exit-code
abigen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install abigen
run: |
wget -q https://gethstore.blob.core.windows.net/builds/geth-alltools-linux-amd64-1.12.0-e501b3b0.tar.gz
tar -zxvf geth-alltools-linux-amd64-1.12.0-e501b3b0.tar.gz
sudo mv geth-alltools-linux-amd64-1.12.0-e501b3b0/abigen /usr/local/bin
- name: Run abigen
run: make contract-abigen
- name: Check diff
run: git diff --exit-code