github.com/sohaha/zlsgo@v1.7.13-0.20240501141223-10dd1a906f76/.github/workflows/go.yml (about) 1 name: UnitTest 2 3 on: 4 push: 5 branches: [master] 6 pull_request: 7 branches: [master] 8 9 env: 10 GO111MODULE: on 11 12 jobs: 13 build: 14 runs-on: ubuntu-latest 15 strategy: 16 matrix: 17 go: [1.18, 1.21] 18 db: [SQLite3] 19 steps: 20 - name: Checkout Code 21 uses: actions/checkout@v3 22 23 - name: Setup Go ${{ matrix.go }} 24 uses: actions/setup-go@v2 25 with: 26 go-version: ${{ matrix.go }} 27 28 - name: Setup Go Tools 29 run: | 30 go mod download 31 export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}" 32 33 - name: Test 34 run: go test -test.short ./... -race -coverprofile=coverage.txt -covermode=atomic 35 36 - name: Codecov Report 37 uses: codecov/codecov-action@v2 38 with: 39 token: ${{ secrets.CODECOV_TOKEN }}