-
Notifications
You must be signed in to change notification settings - Fork 3
47 lines (41 loc) · 1.12 KB
/
build.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
name: Compile And Test
on:
push:
branches:
- "**"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
GOPRIVATE: github.com/sagaxyz/*
steps:
- name: Set up access to private Go modules
env:
GITHUB_USER: ${{ secrets.GH_USER }}
GITHUB_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
run: git config --global url."https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"
- name: Checkout
uses: actions/checkout@v3
- name: Setup Go
uses: actions/setup-go@v3
with:
go-version-file: "./go.mod"
cache: true
- run: go version
- name: Compile
run: make build
- name: Test
run: go test ./...
- name: Happypath
run: |
export PATH=./build/:$PATH
./scripts/ci/prepare-env.sh
./scripts/happypath.sh
- name: Restart
run: |
kill $(pgrep -fi sscd)
sleep 5
rm -rf ~/.ssc/
export PATH=./build/:$PATH
./scripts/ci/prepare-env.sh
./scripts/escrow-chainlet-restart.sh