github.com/ninadingole/gotest-ls@v0.0.3/.github/workflows/base.yml (about) 1 name: test 2 3 on: 4 push: 5 branches: 6 - main 7 pull_request: 8 9 env: 10 GO111MODULE: on 11 GO_VERSION: 1.19.x 12 13 jobs: 14 test: 15 strategy: 16 matrix: 17 os: [ubuntu-latest, macos-latest] 18 go: [1.17.x, 1.18.x, 1.19.x] 19 fail-fast: false 20 runs-on: ${{ matrix.os }} 21 22 steps: 23 - name: Set up Go ${{ matrix.go }} 24 uses: actions/setup-go@v3 25 with: 26 go-version: ${{ matrix.go }} 27 28 - name: Check out code into the Go module directory 29 uses: actions/checkout@v3 30 31 - name: Go cache 32 uses: actions/cache@v3 33 with: 34 path: | 35 ~/go/pkg/mod 36 ~/.cache/go-build 37 key: ${{ runner.os }}-go-${{ matrix.go }}-cache-${{ hashFiles('**/go.sum') }} 38 restore-keys: | 39 ${{ runner.os }}-go-${{ matrix.go }}-cache 40 41 - name: Test 42 id: test 43 run: | 44 make test 45 46 - name: Upload coverage to Codecov 47 if: matrix.go == env.GO_VERSION 48 uses: codecov/codecov-action@v3 49 with: 50 token: ${{ secrets.CODECOV_TOKEN }} 51 files: ./coverage.out 52 flags: unittests-${{ matrix.os }}