Merge pull request #285 from vgarvardt/ci/bump-actions #516
This file contains 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: "Test" | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
go-version: [ '1.20', '1.21', 'stable' ] | |
timeout-minutes: 10 | |
steps: | |
- name: Check out code | |
uses: actions/checkout@v4 | |
- name: Setup dependencies | |
uses: ./.github/actions/setup-deps | |
with: | |
go-version: ${{ matrix.go-version }} | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Run tests | |
run: task test | |
- name: Upload coverage to Codecov | |
if: success() | |
uses: codecov/codecov-action@v4 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
file: ./coverage.txt | |
fail_ci_if_error: false | |
summary: | |
name: Test | |
runs-on: ubuntu-latest | |
needs: [ test ] | |
timeout-minutes: 1 | |
steps: | |
- name: Dummy task | |
run: echo 'Dummy summary task to have one PR status for all tested versions' |