Drop support for Go 1.25 #1591
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: 🧪 Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| matrix: | |
| go-version: ["1.26", "1.27"] | |
| os: | |
| - runner: ubuntu-latest | |
| name: ubuntu-x86_64 | |
| - runner: ubuntu-24.04-arm | |
| name: ubuntu-arm64 | |
| - runner: macos-14 | |
| name: macos-arm64 | |
| - runner: macos-14-large | |
| name: macos-x86_64 | |
| fail-fast: false | |
| runs-on: ${{ matrix.os.runner }} | |
| name: test (${{ matrix.os.name }}, Go ${{ matrix.go-version }}) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache-dependency-path: | | |
| go.sum | |
| tools/go.sum | |
| cmd/zen-go/go.sum | |
| - name: Install tools | |
| run: make install-tools-test | |
| - name: Run tests | |
| run: make test | |
| - name: Upload main module coverage to Codecov | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| if: ${{ !contains(matrix.os.name, 'arm64') }} | |
| with: | |
| fail_ci_if_error: true | |
| files: ./coverage.out | |
| flags: unittests | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Upload zen-go CLI coverage to Codecov | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| with: | |
| fail_ci_if_error: false | |
| files: ./cmd/zen-go/coverage.out | |
| flags: cli | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Convert coverage to LCOV for Aikido | |
| if: matrix.os.name == 'ubuntu-x86_64' | |
| run: | | |
| go install github.com/jandelgado/gcov2lcov@51ca2a7f808b9da700efd71ae060e4c9e0deefc9 # v1.1.1 | |
| gcov2lcov -infile=coverage.out -outfile=coverage-main-go${{ matrix.go-version }}.lcov | |
| gcov2lcov -infile=cmd/zen-go/coverage.out -outfile=coverage-zen-go-go${{ matrix.go-version }}.lcov | |
| - name: Upload LCOV artifact for Aikido | |
| if: matrix.os.name == 'ubuntu-x86_64' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aikido-lcov-main-go${{ matrix.go-version }} | |
| path: | | |
| coverage-main-go${{ matrix.go-version }}.lcov | |
| coverage-zen-go-go${{ matrix.go-version }}.lcov | |
| test-instrumentation-unit: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ["1.26", "1.27"] | |
| fail-fast: false | |
| name: test-instrumentation-unit (Go ${{ matrix.go-version }}) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache-dependency-path: | | |
| go.sum | |
| tools/go.sum | |
| instrumentation/**/go.sum | |
| - name: Install tools | |
| run: make install-tools-test | |
| - name: Run unit tests | |
| run: make test-instrumentation-unit | |
| - name: Upload instrumentation unit coverage to Codecov | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| with: | |
| fail_ci_if_error: true | |
| files: ./coverage.out | |
| flags: instrumentation-unit | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Convert coverage to LCOV for Aikido | |
| run: | | |
| go install github.com/jandelgado/gcov2lcov@51ca2a7f808b9da700efd71ae060e4c9e0deefc9 # v1.1.1 | |
| gcov2lcov -infile=coverage.out -outfile=coverage-instrumentation-unit-go${{ matrix.go-version }}.lcov | |
| - name: Upload LCOV artifact for Aikido | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aikido-lcov-instrumentation-unit-go${{ matrix.go-version }} | |
| path: coverage-instrumentation-unit-go${{ matrix.go-version }}.lcov | |
| test-instrumentation-integration: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ["1.26", "1.27"] | |
| fail-fast: false | |
| name: test-instrumentation-integration (Go ${{ matrix.go-version }}) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache-dependency-path: | | |
| go.sum | |
| tools/go.sum | |
| cmd/zen-go/go.sum | |
| instrumentation/**/go.sum | |
| - name: Install tools | |
| run: make install-tools-test | |
| - name: Build Zen Go | |
| run: make build-zen-go | |
| - name: Run tests | |
| run: make test-instrumentation-integration | |
| - name: Upload instrumentation coverage to Codecov | |
| uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4 | |
| with: | |
| fail_ci_if_error: true | |
| files: ./coverage.out | |
| flags: instrumentation-integration | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| verbose: true | |
| - name: Convert coverage to LCOV for Aikido | |
| run: | | |
| go install github.com/jandelgado/gcov2lcov@51ca2a7f808b9da700efd71ae060e4c9e0deefc9 # v1.1.1 | |
| gcov2lcov -infile=coverage.out -outfile=coverage-instrumentation-integration-go${{ matrix.go-version }}.lcov | |
| - name: Upload LCOV artifact for Aikido | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: aikido-lcov-instrumentation-integration-go${{ matrix.go-version }} | |
| path: coverage-instrumentation-integration-go${{ matrix.go-version }}.lcov | |
| upload-coverage-aikido: | |
| needs: | |
| - test | |
| - test-instrumentation-unit | |
| - test-instrumentation-integration | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Download coverage artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: aikido-coverage | |
| pattern: aikido-lcov-* | |
| merge-multiple: true | |
| - name: List LCOV files | |
| id: lcov | |
| run: | | |
| { | |
| echo 'paths<<EOF' | |
| find aikido-coverage -name '*.lcov' | |
| echo EOF | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Upload coverage to Aikido | |
| uses: AikidoSec/code-coverage-github-action@18138c9866f45cb159779a167d6e1330c967fe28 # v0.1.1 | |
| with: | |
| lcov-file-paths: ${{ steps.lcov.outputs.paths }} | |
| test-e2e: | |
| name: "e2e tests - ${{ matrix.app }}" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| app: | |
| - gin-postgres | |
| - echo-postgres | |
| - echo-v5-postgres | |
| - echo-pgx-sql | |
| - gin-pgx-native | |
| - gin-sqlx | |
| - chi-postgres | |
| - http-postgres | |
| - fiber-v2-postgres | |
| - fiber-v3-postgres | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Set up Go | |
| uses: actions/setup-go@b7ad1dad31e06c5925ef5d2fc7ad053ef454303e # v7.0.0 | |
| with: | |
| go-version: "1.26" | |
| cache-dependency-path: | | |
| go.sum | |
| sample-apps/${{ matrix.app }}/go.sum | |
| - name: Run all test suites | |
| working-directory: ./end2end | |
| run: make test-all-suites APP=${{ matrix.app }} | |
| - name: Show app logs on failure | |
| if: failure() | |
| run: cat /tmp/${{ matrix.app }}.log || true |