github.com/saferwall/pe@v1.5.2/.github/workflows/ci.yaml (about) 1 name: Build & Test 2 3 on: [push] 4 5 jobs: 6 test: 7 name: Build & Test 8 strategy: 9 fail-fast: false 10 matrix: 11 go-version: [1.16.x, 1.17.x, 1.18.x, 1.19.x] 12 os: [ubuntu-latest, macos-latest, windows-latest] 13 runs-on: ${{ matrix.os }} 14 steps: 15 - name: Checkout 16 uses: actions/checkout@v3 17 18 - name: Install Go 19 uses: actions/setup-go@v3 20 with: 21 go-version: ${{ matrix.go-version }} 22 23 - name: Build 24 run: | 25 go env -w GOFLAGS=-mod=mod 26 go build -v ./... 27 28 - name: Extract test data 29 run: | 30 cd test 31 7z x "*.7z" -pinfected 32 33 - name: Test With Coverage 34 run: go test -race -coverprofile=coverage -covermode=atomic 35 36 - name: Upload coverage to Codecov 37 uses: codecov/codecov-action@v2 38 with: 39 files: ./coverage 40 if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x' 41 42 - name: Go vet 43 run: | 44 go vet . 45 if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x' 46 47 - name: Staticcheck 48 uses: dominikh/staticcheck-action@v1.3.0 49 with: 50 version: "2022.1" 51 install-go: false 52 cache-key: ${{ matrix.go }} 53 if: matrix.os == 'windows-latest' && matrix.go-version == '1.19.x'