chore(deps): bump docker/setup-qemu-action from 3 to 4 #59
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: [main, master, develop] | |
| pull_request: | |
| branches: [main, master, develop] | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| go-version: ["1.25"] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - name: Cache Go modules | |
| uses: actions/cache@v5 | |
| with: | |
| path: | | |
| ~/.cache/go-build | |
| ~/go/pkg/mod | |
| key: ${{ runner.os }}-go-${{ matrix.go-version }}-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go-${{ matrix.go-version }}- | |
| ${{ runner.os }}-go- | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Verify dependencies | |
| run: go mod verify | |
| - name: Run tests (Unix) | |
| if: runner.os != 'Windows' | |
| run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./... | |
| - name: Run tests (Windows) | |
| if: runner.os == 'Windows' | |
| run: go test -v -race ./... | |
| shell: cmd | |
| - name: Upload coverage to Codecov | |
| if: matrix.os == 'ubuntu-latest' && matrix.go-version == '1.25' | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| file: ./coverage.txt | |
| flags: unittests | |
| fail_ci_if_error: false | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: test | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| - name: Build for Linux | |
| run: GOOS=linux GOARCH=amd64 go build -v -o reverse-scan-linux-amd64 | |
| - name: Build for macOS | |
| run: GOOS=darwin GOARCH=amd64 go build -v -o reverse-scan-darwin-amd64 | |
| - name: Build for Windows | |
| run: GOOS=windows GOARCH=amd64 go build -v -o reverse-scan-windows-amd64.exe | |
| - name: Upload Linux artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: reverse-scan-linux-amd64 | |
| path: reverse-scan-linux-amd64 | |
| - name: Upload macOS artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: reverse-scan-darwin-amd64 | |
| path: reverse-scan-darwin-amd64 | |
| - name: Upload Windows artifact | |
| uses: actions/upload-artifact@v6 | |
| with: | |
| name: reverse-scan-windows-amd64 | |
| path: reverse-scan-windows-amd64.exe | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: "1.25" | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.7.2 |