github.com/btcsuite/btcd@v0.24.0/.github/workflows/go.yml (about) 1 name: Build and Test 2 on: [push, pull_request] 3 4 env: 5 # go needs absolute directories, using the $HOME variable doesn't work here. 6 GOCACHE: /home/runner/work/go/pkg/build 7 GOPATH: /home/runner/work/go 8 GO_VERSION: 1.17.5 9 10 jobs: 11 build: 12 name: Build 13 runs-on: ubuntu-latest 14 steps: 15 - name: Set up Go 16 uses: actions/setup-go@v2 17 with: 18 go-version: ${{ env.GO_VERSION }} 19 20 - name: Check out source 21 uses: actions/checkout@v2 22 23 - name: Build 24 run: make build 25 26 test-cover: 27 name: Unit coverage 28 runs-on: ubuntu-latest 29 steps: 30 - name: Set up Go 31 uses: actions/setup-go@v2 32 with: 33 go-version: ${{ env.GO_VERSION }} 34 35 - name: Check out source 36 uses: actions/checkout@v2 37 38 - name: Test 39 run: make unit-cover 40 41 - name: Send top-level coverage 42 uses: shogo82148/actions-goveralls@v1 43 with: 44 path-to-profile: coverage.txt 45 flag-name: btcd 46 parallel: true 47 48 - name: Send btcec 49 uses: shogo82148/actions-goveralls@v1 50 with: 51 path-to-profile: btcec/coverage.txt 52 flag-name: btcec 53 parallel: true 54 55 - name: Send btcutil coverage 56 uses: shogo82148/actions-goveralls@v1 57 with: 58 path-to-profile: btcutil/coverage.txt 59 flag-name: btcutil 60 parallel: true 61 62 - name: Send btcutil coverage for psbt package 63 uses: shogo82148/actions-goveralls@v1 64 with: 65 path-to-profile: btcutil/psbt/coverage.txt 66 flag-name: btcutilpsbt 67 parallel: true 68 69 - name: Notify coveralls all reports sent 70 uses: shogo82148/actions-goveralls@v1 71 with: 72 parallel-finished: true 73 74 test-race: 75 name: Unit race 76 runs-on: ubuntu-latest 77 steps: 78 - name: Set up Go 79 uses: actions/setup-go@v2 80 with: 81 go-version: ${{ env.GO_VERSION }} 82 83 - name: Check out source 84 uses: actions/checkout@v2 85 86 - name: Test 87 run: make unit-race