Simplify workflow settings and upgrade setup-go to v4
Some checks failed
REUSE Compliance Check / test (push) Successful in 4s
SonarQube / Build (push) Failing after 1m29s
golangci-lint / lint (push) Failing after 11m20s

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:
Winni Neessen 2024-02-13 23:33:37 +01:00
parent 94eca2f3fe
commit 8923b88e07
Signed by: wneessen
GPG key ID: 5F3AF39B820C119D

View file

@ -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