Simplify workflow settings and upgrade setup-go to v4
This commit simplifies the Forgejo workflow settings by hardcoding the 'docker' and '1.22' options for the 'runs-on' and 'go-version' respectively, instead of using a matrix. The version of setup-go action is also upgraded to v4.
This commit is contained in:
parent
94eca2f3fe
commit
8923b88e07
|
@ -24,23 +24,19 @@ env:
|
|||
API_KEY: ${{ secrets.API_KEY }}
|
||||
jobs:
|
||||
run:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [docker]
|
||||
go: ['1.22']
|
||||
runs-on: docker
|
||||
steps:
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@master
|
||||
- name: Setup go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
go-version: '1.22'
|
||||
- name: Run Tests
|
||||
run: |
|
||||
go test -v -shuffle=on -race --coverprofile=coverage.coverprofile --covermode=atomic ./...
|
||||
- name: Upload coverage to Codecov
|
||||
if: success() && matrix.go == '1.20' && matrix.os == 'ubuntu-latest'
|
||||
uses: codecov/codecov-action@v3
|
||||
runs-on: ubuntu-latest
|
||||
with:
|
||||
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos
|
||||
|
|
Loading…
Reference in a new issue