-
Notifications
You must be signed in to change notification settings - Fork 3
61 lines (53 loc) · 1.61 KB
/
contract-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
name: Contract Test
# Run Contract Test
on:
push:
branches: [master]
pull_request:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Checkout dapp
uses: actions/checkout@v2
# Select a branch on agoric-sdk to test against by adding text to the body of the
# pull request. For example: #agoric-sdk-branch: zoe-release-0.7.0
# The default is 'master'
- name: Get the appropriate agoric-sdk branch
id: get-branch
uses: actions/github-script@0.9.0
with:
result-encoding: string
script: |
const { body = '' } = context.payload.pull_request || {};
const regex = /.*\#agoric-sdk-branch:\s+(\S+)/;
const match = regex.exec(body);
const agoricSdkBranch = match && match[1] || 'master';
console.log(agoricSdkBranch);
return agoricSdkBranch;
- name: Checkout agoric-sdk
uses: actions/checkout@v2
with:
repository: schnetzlerjoe/agoric-sdk
path: agoric-sdk
ref: ${{steps.get-branch.outputs.result}}
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Setup and link agoric-sdk packages
run: |
yarn install
yarn build
yarn link-cli ~/bin/agoric
echo "/home/runner/bin" >> $GITHUB_PATH
working-directory: ./agoric-sdk
- name: agoric install
run: agoric install
- name: yarn build
run: yarn build
- name: yarn test (everything)
run: yarn test