update to Go 1.26, drop Go 1.24 #378
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 | |
| permissions: | |
| contents: read | |
| on: [push, pull_request] | |
| jobs: | |
| unit: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ "ubuntu", "windows", "macos" ] | |
| go: [ "1.25.x", "1.26.x" ] | |
| runs-on: ${{ fromJSON(vars[format('UNIT_RUNNER_{0}', matrix.os)] || format('"{0}-latest"', matrix.os)) }} | |
| name: Unit tests (${{ matrix.os}}, Go ${{ matrix.go }}) | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ matrix.go }} | |
| - run: go version | |
| - name: Install go-junit-report | |
| run: go install github.com/jstemmer/go-junit-report/v2@v2.1.0 | |
| - name: Run tests | |
| env: | |
| TIMESCALE_FACTOR: 10 | |
| run: go test -v -cover -coverprofile coverage.txt ./... 2>&1 | go-junit-report -set-exit-code -iocopy -out report.xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| OS: ${{ matrix.os }} | |
| GO: ${{ matrix.go }} | |
| with: | |
| files: coverage.txt | |
| env_vars: OS,GO | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test report to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| env: | |
| OS: ${{ matrix.os }} | |
| GO: ${{ matrix.go }} | |
| with: | |
| report_type: test_results | |
| name: Unit tests | |
| files: report.xml | |
| env_vars: OS,GO | |
| token: ${{ secrets.CODECOV_TOKEN }} |