-
Notifications
You must be signed in to change notification settings - Fork 19
129 lines (114 loc) · 3.58 KB
/
ts.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Typescript, Solidity and cross-language tests
on:
push:
branches: [main]
pull_request:
paths:
[
"packages/nitro-protocol/contracts/**",
"generate-adjudicator-bindings.sh",
".github/workflows/bindings-check.yml",
"node/engine/chainservice/adjudicator/NitroAdjudicator.go",
"node/engine/chainservice/consensusapp/ConsensusApp.go",
"node/engine/chainservice/erc20/Token.go",
"node/engine/chainservice/virtualpaymentapp/VirtualPaymentApp.go",
]
jobs:
install-ts-monorepo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.15.0"
- name: yarn
run: yarn
bootstrap-ts-monorepo:
runs-on: ubuntu-latest
needs: install-ts-monorepo
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "18.15.0"
- name: bootstrap
run: yarn bootsrap
install-abigen:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: "1.21.0"
- name: Install go-ethereum (includes abigen)
run: go install github.com/ethereum/go-ethereum
install-solc:
runs-on: ubuntu-latest
steps:
- name: make bin folder
run: |
mkdir -p $GITHUB_WORKSPACE/bin
echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Install solc
run: |
curl -o solc https://binaries.soliditylang.org/linux-amd64/solc-linux-amd64-v0.8.17+commit.8df45f5f
mv solc $GITHUB_WORKSPACE/bin
sudo chmod +x $GITHUB_WORKSPACE/bin/solc
install-foundry:
runs-on: ubuntu-latest
steps:
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
make-gui:
runs-on: ubuntu-latest
needs: bootstrap-ts-monorepo
steps:
- name: Build UI
run: make ui/build
regenerate-bindings-and-check:
needs: [install-solc, install-abigen]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: add bin folder to path
run: echo "$GITHUB_WORKSPACE/bin" >> $GITHUB_PATH
- name: Regenerate contract bindings
run: sh ./generate-adjudicator-bindings.sh
- name: check git tree is clean
# This will fail the job if any previous step (re)generated a file
# that doesn't match what you checked in (or forgot to check in)
run: git diff --exit-code
lint-ts:
runs-on: ubuntu-latest
needs: install-ts-monorepo
steps:
- name: Lint all packages
run: yarn run lint
test-ts:
runs-on: ubuntu-latest
needs: install-ts-monorepo
steps:
- name: test all packages
run: yarn run test
test-contracts:
runs-on: ubuntu-latest
needs: bootstrap-ts-monorepo
steps:
- name: Run contract tests
run: yarn test:contracts
ts-rpc-interop:
runs-on: ubuntu-latest
needs: [bootstrap-ts-monorepo, install-foundry, make-gui]
steps:
- name: Run go-nitro RPC servers with GUI
run: go run ./cmd/start-rpc-servers -ui=true &> output.log &
- name: Run Create Channels script
# TODO: We could write a test specific script that creates channels and checks the results
run: npx ts-node ./scripts/client-runner.ts create-channels -w 300000 &> output.log
working-directory: packages/nitro-rpc-client
- name: Archive logs
if: always()
uses: actions/upload-artifact@v2
with:
name: logs
path: ./**/*.log