Merge pull request #594 from onflow/dependabot/github_actions/github/… #1092
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
| # GitHub Actions - CI for Go to build & test. | |
| # Based on copy of https://github.com/fxamacker/cbor/workflows/ci.yml | |
| name: ci | |
| # Remove default permissions at top level and grant in jobs. | |
| permissions: {} | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| - 'release-**' | |
| pull_request: | |
| branches: | |
| - main | |
| - 'feature/**' | |
| - 'release-**' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| # Test on various OS with default Go version. | |
| tests: | |
| name: Test on ${{matrix.os}} | |
| runs-on: ${{ matrix.os }} | |
| permissions: | |
| contents: read | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| go-version: ['1.24', '1.25'] | |
| steps: | |
| - name: Install Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| check-latest: true | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| with: | |
| fetch-depth: 1 | |
| - name: Get dependencies | |
| run: go get -v -t -d ./... | |
| - name: Build project | |
| run: go build ./... | |
| - name: Run tests | |
| run: | | |
| go version | |
| go test -timeout 180m -race -v ./... |