github.com/googollee/clic@v0.1.5/.github/workflows/tests.yml (about) 1 name: Tests 2 3 on: 4 push: 5 branches: ['*'] 6 pull_request: 7 branches: [master] 8 9 jobs: 10 test-server: 11 name: Test server 12 runs-on: ubuntu-latest 13 strategy: 14 matrix: 15 go-version: 16 - '1.24' 17 - 'stable' 18 19 steps: 20 - name: Checkout repo 21 uses: actions/checkout@v4 22 23 - name: Setup Go ${{ matrix.go-version }} 24 uses: actions/setup-go@v5 25 with: 26 go-version: ${{ matrix.go-version }} 27 28 - name: Test 29 run: | 30 go test ./... -race \ 31 -coverpkg=./... -coverprofile=coverage.txt -covermode=atomic -cover 32 33 - name: Upload to codecov 34 uses: codecov/codecov-action@v5 35 with: 36 token: ${{ secrets.CODECOV_TOKEN }} 37 files: ./coverage.txt 38 flags: unittests 39 fail_ci_if_error: true 40 verbose: true