github.com/zchee/zap-cloudlogging@v0.0.0-20220819025602-19b026d3900e/.github/workflows/test.yaml (about) 1 name: Test 2 3 on: 4 push: 5 branches: 6 - "main" 7 pull_request: 8 9 jobs: 10 test: 11 runs-on: ubuntu-22.04 12 13 steps: 14 - name: Checkout 15 uses: actions/checkout@v3 16 17 - name: Setup Go 18 uses: actions/setup-go@v3 19 with: 20 go-version: '1.19.x' 21 cache: true 22 23 - name: Cache tools binaries 24 id: go-tools-cache 25 uses: actions/cache@v3 26 with: 27 path: /home/runner/work/zap-cloudlogging/zap-cloudlogging/tools/bin 28 key: go-tools-${{ runner.os }}-${{ hashFiles('tools/go.sum') }} 29 restore-keys: go-tools-${{ runner.os }}-${{ hashFiles('tools/go.sum') }} 30 31 - name: Take a coverage 32 run: | 33 make coverage 34 35 - name: Upload coverage to Codecov 36 uses: codecov/codecov-action@v3 37 with: 38 token: ${{ secrets.CODECOV_TOKEN }} 39 files: ./coverage.out 40 fail_ci_if_error: false