-
Notifications
You must be signed in to change notification settings - Fork 27
74 lines (59 loc) · 1.59 KB
/
abi_bindings_checker.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
name: ABI Go Bindings Checker
on:
push:
branches:
- main
pull_request:
branches:
- "*"
jobs:
abi_binding:
name: abi_binding
runs-on: ubuntu-20.04
steps:
- name: Checkout Teleporter repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set Go version
run: |
source ./scripts/versions.sh
GO_VERSION=$GO_VERSION >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Generate ABI Go bindings
run: |
export GOPATH=$HOME/go
export PATH="$PATH:$GOPATH/bin"
./scripts/abi_bindings.sh
- name: Print diff
run: git --no-pager diff -- abi-bindings/**.go
- name: Fail if diff exists
run: git --no-pager diff --quiet -- abi-bindings/**.go
unit_tests:
name: Unit tests
runs-on: ubuntu-20.04
steps:
- name: Checkout repositories and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Set Go version
run: |
source ./scripts/versions.sh
GO_VERSION=$GO_VERSION >> $GITHUB_ENV
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: ${{ env.GO_VERSION }}
- name: Run ABI Binding Unit Tests
run: |
source scripts/constants.sh
cd abi-bindings/go
go test ./...