chore(ci): Add Go 1.25 #112
Workflow file for this run
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: Code | |
| on: | |
| push: | |
| tags: | |
| - v* | |
| branches: | |
| - main | |
| - v* | |
| pull_request: | |
| schedule: | |
| - cron: '38 5 * * 3' | |
| concurrency: | |
| group: ${{ format('{0}-{1}', github.workflow, github.head_ref) }} | |
| cancel-in-progress: true | |
| permissions: read-all | |
| jobs: | |
| Lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5.0.0 # immutable action, safe to use the versions | |
| - uses: actions/setup-go@v5.5.0 # immutable action, safe to use the versions | |
| with: | |
| go-version-file: go.mod # use Go version from go.mod as minimum supported version | |
| - uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0 | |
| with: | |
| version: latest | |
| UnitTestJob: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go: | |
| - "1.22" | |
| - "1.23" | |
| - "1.24" | |
| - "1.25" | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5.0.0 # immutable action, safe to use the versions | |
| - name: Install Go | |
| uses: actions/setup-go@v5.5.0 # immutable action, safe to use the versions | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - run: go install github.com/jstemmer/go-junit-report/v2@latest | |
| - run: go test -race -cover -coverprofile=coverage.out -covermode=atomic ./... | |
| - run: go test -json 2>&1 | go-junit-report -parser gojson > junit.xml | |
| if: always() | |
| - name: Upload coverage reports to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@18283e04ce6e62d37312384ff67231eb8fd56d24 # v5.4.3 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@47f89e9acb64b76debcd5ea40642d25a4adced9f # v1.1.1 | |
| env: | |
| CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
| UnitTests: | |
| if: ${{ always() }} | |
| needs: UnitTestJob | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check status | |
| if: ${{ needs.UnitTestJob.result != 'success' }} | |
| run: exit 1 |