-
Notifications
You must be signed in to change notification settings - Fork 21
55 lines (48 loc) · 1.76 KB
/
test.yaml
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
on:
pull_request:
branches:
- main
workflow_dispatch:
name: Tests
jobs:
test:
runs-on: ubuntu-latest
name: test and coverage
steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Setup go
uses: actions/setup-go@v2
with:
go-version: "1.21.0"
- name: Run Test
run: |
go test ./... -covermode=count -coverprofile=coverage.out
go tool cover -func=coverage.out -o=coverage.out
integration-tests:
name: integration tests
# Run on older Ubuntu version because of older LibSSL dependency.
runs-on: ubuntu-20.04
steps:
- name: Checkout Code
uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token.
fetch-depth: 0 # otherwise, there would be errors pushing refs to the destination repository.
- name: Set up Go 1.21.0
uses: actions/setup-go@v2
with:
go-version: "1.21.0"
- name: Install Blockless Runtime
run: |
mkdir -p /tmp/blockless-runtime
curl -L -o runtime.tar.gz https://github.com/blocklessnetwork/runtime/releases/download/v0.3.1/blockless-runtime.ubuntu-20.04.x86_64.tar.gz
tar xzf runtime.tar.gz -C /tmp/blockless-runtime
rm runtime.tar.gz
- name: Run integration tests
run: |
export B7S_INTEG_RUNTIME_DIR=/tmp/blockless-runtime
go test --tags=integration ./...