github.com/goplus/yap@v0.8.1/.github/workflows/go.yml (about) 1 # This workflow will build a golang project 2 # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go 3 4 name: Go 5 6 on: 7 push: 8 branches: [ "main" ] 9 pull_request: 10 branches: [ "main" ] 11 12 jobs: 13 14 build: 15 strategy: 16 matrix: 17 go-version: [1.18.x, 1.21.x] 18 os: [ubuntu-latest, windows-latest,macos-latest] 19 runs-on: ${{ matrix.os }} 20 steps: 21 - uses: actions/checkout@v4 22 23 - name: Set up Go 24 uses: actions/setup-go@v5 25 with: 26 go-version: ${{ matrix.go-version }} 27 28 - name: Build 29 run: | 30 go build -v ./... 31 cd demo 32 go build -v ./... 33 34 - name: Test 35 run: go test -v -coverprofile="coverage.txt" -covermode=atomic ./... 36 37 - name: Codecov 38 uses: codecov/codecov-action@v4 39 with: 40 token: ${{ secrets.CODECOV_TOKEN }}