github.com/Uhtred009/v2ray-core-1@v4.31.2+incompatible/.github/workflows/coverage.yml (about) 1 name: Coverage 2 3 on: 4 push: 5 branches: [master] 6 paths: 7 - "**/*.go" 8 9 jobs: 10 coverage: 11 if: github.repository != 'v2ray/v2ray-core' 12 runs-on: ubuntu-latest 13 steps: 14 - name: Set up Go 1.x 15 uses: actions/setup-go@v2 16 with: 17 go-version: ^1.15 18 19 - name: Checkout codebase 20 uses: actions/checkout@v2 21 22 - name: Cache go module 23 uses: actions/cache@v2 24 id: cache-gomodules 25 with: 26 path: ~/go/pkg/mod 27 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 28 restore-keys: | 29 ${{ runner.os }}-go- 30 31 - name: Get dependencies 32 if: steps.cache-gomodules.outputs.cache-hit != 'true' 33 run: | 34 go get -v -t -d ./... 35 36 - name: Run coverage 37 run: ./testing/coverage/coverall2 38 39 - name: Upload coverage to Codecov 40 uses: codecov/codecov-action@v1 41 with: 42 file: ./coverage.txt 43 fail_ci_if_error: true