Skip to content

Commit

Permalink
Merge pull request #113 from nspcc-dev/tune-workflows
Browse files Browse the repository at this point in the history
Tune workflows
  • Loading branch information
AnnaShaleva authored Apr 24, 2024
2 parents ca4f328 + f11740a commit 45ef355
Showing 1 changed file with 39 additions and 5 deletions.
44 changes: 39 additions & 5 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,24 @@ jobs:

test:
name: Test
runs-on: ubuntu-latest
runs-on: ${{ matrix.os }}
strategy:
matrix:
go: [ '1.20', '1.21', '1.22']
os: [ubuntu-latest, windows-2022, macos-14]
exclude:
# Only latest Go version for Windows and MacOS.
- os: windows-2022
go: '1.20'
- os: windows-2022
go: '1.21'
- os: macos-14
go: '1.20'
- os: macos-14
go: '1.21'
# Exclude latest Go version for Ubuntu as Coverage uses it.
- os: ubuntu-latest
go: '1.22'
steps:

- name: Setup go
Expand All @@ -42,12 +56,32 @@ jobs:
uses: actions/checkout@v4

- name: Tests
run: go test -race ./...

coverage:
name: Coverage
runs-on: ubuntu-latest
steps:

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: 1.22

- name: Check out
uses: actions/checkout@v4

- name: Collect coverage
run: go test -coverprofile=coverage.txt -covermode=atomic ./...

- name: Codecov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
run: bash <(curl -s https://codecov.io/bash)
- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v4
with:
fail_ci_if_error: true
files: ./coverage.txt
slug: nspcc-dev/dbft
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true

codeql:
name: CodeQL
Expand Down

0 comments on commit 45ef355

Please sign in to comment.