Multi-version Tests #164
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: Multi-version Tests | |
| on: | |
| workflow_run: | |
| workflows: ["build"] | |
| types: | |
| - completed | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'utils/**' | |
| - 'concurrency/**' | |
| - 'sync/**' | |
| pull_request: | |
| branches: | |
| - '**' | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false # Allow all versions to run even if one fails | |
| matrix: | |
| module: [utils, concurrency, sync] | |
| go-version: ['1.22', '1.23', '1.24'] | |
| defaults: | |
| run: | |
| working-directory: ${{ matrix.module }} | |
| steps: | |
| - name: Clone repo | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| cache: true | |
| cache-dependency-path: ${{ matrix.module }}/go.sum | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Build | |
| run: go build ./... | |
| - name: Test | |
| run: go test ./... -race |