Fix get ref #3568
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
concurrency: | |
group: "tests-${{ github.ref }}" | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [ master, staging, sprint* ] | |
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 |