ci: fixed golang dependency for jobs
This commit is contained in:
parent
519cfcf7b7
commit
0aa2cbdf02
1 changed files with 15 additions and 6 deletions
|
@ -11,11 +11,14 @@ jobs:
|
|||
checks:
|
||||
name: Checks
|
||||
runs-on: docker
|
||||
container:
|
||||
image: golang:1.23
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23.x'
|
||||
check-latest: true
|
||||
- name: Run go fmt and go vet
|
||||
run: |
|
||||
go fmt $(go list ./...)
|
||||
|
@ -24,11 +27,14 @@ jobs:
|
|||
code-coverage:
|
||||
name: Code Coverage
|
||||
runs-on: docker
|
||||
container:
|
||||
image: golang:1.23
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23.x'
|
||||
check-latest: true
|
||||
- name: Run tests and generate coverage report
|
||||
run: |
|
||||
go test -covermode=count -coverprofile coverage.cov $(go list ./...)
|
||||
|
@ -45,8 +51,6 @@ jobs:
|
|||
build:
|
||||
name: Build
|
||||
runs-on: docker
|
||||
container:
|
||||
image: golang:1.23
|
||||
strategy:
|
||||
matrix:
|
||||
go:
|
||||
|
@ -63,6 +67,11 @@ jobs:
|
|||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.23.x'
|
||||
check-latest: true
|
||||
- name: Set environment variables
|
||||
run: |
|
||||
echo "GOOS=${{ matrix.go.GOOS }}" >> $GITHUB_ENV
|
||||
|
|
Loading…
Add table
Reference in a new issue