-
Notifications
You must be signed in to change notification settings - Fork 23
81 lines (67 loc) · 1.98 KB
/
tests.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
name: Tests
concurrency:
group: "tests-${{ github.ref }}"
cancel-in-progress: true
on:
push:
branches:
- master
- staging
tags:
pull_request:
jobs:
linter:
name: Lints
runs-on: [self-hosted,arc-runner]
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ^1.20 # The Go version to download (if necessary) and use.
- name: Clone blobber
uses: actions/checkout@v2
- name: Install Packages
run: |
sudo apt-get update
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev
sudo apt-get install wget
- name: Buf-lint
if: success()
run: make local
- name: Build Base
run: ./docker.local/bin/build.base.sh
- name: Check swagger generation
run: docker.local/bin/test.swagger.sh
- name: Golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: latest
args: --timeout=2m0s
skip-cache: true
skip-pkg-cache: true
skip-build-cache: true
unit-tests:
name: Unit Tests
runs-on: [self-hosted,arc-runner]
steps:
- name: Setup go
uses: actions/setup-go@v3
with:
go-version: ^1.20 # The Go version to download (if necessary) and use.
- name: Clone blobber
uses: actions/checkout@v2
- name: Install Make Command
run: |
sudo apt-get update
sudo apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev wget
- name: Run tests
run: |
cd $GITHUB_WORKSPACE/code/go/0chain.net/
CGO_ENABLED=1 go test -tags bn256 -race -coverprofile=coverage.txt -covermode=atomic ./...
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
# fail_ci_if_error: true
files: ./code/go/0chain.net/coverage.txt
flags: Unit-Tests
verbose: true