mirror of
https://github.com/NVIDIA/nvidia-container-toolkit
synced 2025-03-09 22:00:31 +00:00
[no-relnote] Enable CodeCov
Some checks failed
Some checks failed
Signed-off-by: Carlos Eduardo Arango Gutierrez <eduardoa@nvidia.com>
This commit is contained in:
parent
d82a9ccd89
commit
ce27020047
20
.github/workflows/golang.yaml
vendored
20
.github/workflows/golang.yaml
vendored
@ -30,54 +30,74 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
name: Checkout code
|
name: Checkout code
|
||||||
|
|
||||||
- name: Get Golang version
|
- name: Get Golang version
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
GOLANG_VERSION=$(./hack/golang-version.sh)
|
GOLANG_VERSION=$(./hack/golang-version.sh)
|
||||||
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
|
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOLANG_VERSION }}
|
go-version: ${{ env.GOLANG_VERSION }}
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
uses: golangci/golangci-lint-action@v6
|
uses: golangci/golangci-lint-action@v6
|
||||||
with:
|
with:
|
||||||
version: latest
|
version: latest
|
||||||
args: -v --timeout 5m
|
args: -v --timeout 5m
|
||||||
skip-cache: true
|
skip-cache: true
|
||||||
|
|
||||||
- name: Check golang modules
|
- name: Check golang modules
|
||||||
run: |
|
run: |
|
||||||
make check-vendor
|
make check-vendor
|
||||||
make -C deployments/devel check-modules
|
make -C deployments/devel check-modules
|
||||||
|
|
||||||
test:
|
test:
|
||||||
name: Unit test
|
name: Unit test
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get Golang version
|
- name: Get Golang version
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
GOLANG_VERSION=$(./hack/golang-version.sh)
|
GOLANG_VERSION=$(./hack/golang-version.sh)
|
||||||
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
|
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION := }" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOLANG_VERSION }}
|
go-version: ${{ env.GOLANG_VERSION }}
|
||||||
|
|
||||||
- run: make test
|
- run: make test
|
||||||
|
|
||||||
|
- name: Upload coverage reports to Codecov
|
||||||
|
uses: codecov/codecov-action@v5
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
files: ./coverage.out
|
||||||
|
fail_ci_if_error: false
|
||||||
|
verbose: true
|
||||||
|
|
||||||
build:
|
build:
|
||||||
name: Build
|
name: Build
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Get Golang version
|
- name: Get Golang version
|
||||||
id: vars
|
id: vars
|
||||||
run: |
|
run: |
|
||||||
GOLANG_VERSION=$(./hack/golang-version.sh)
|
GOLANG_VERSION=$(./hack/golang-version.sh)
|
||||||
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
|
echo "GOLANG_VERSION=${GOLANG_VERSION##GOLANG_VERSION ?= }" >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: ${{ env.GOLANG_VERSION }}
|
go-version: ${{ env.GOLANG_VERSION }}
|
||||||
|
|
||||||
- run: make build
|
- run: make build
|
||||||
|
Loading…
Reference in New Issue
Block a user