intel-device-plugins-for-ku.../.github/workflows/lib-validate.yaml
Mikko Ylinen 49268b7c18 ci: bump to golanci-lint v2.1.6
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2025-05-12 17:50:06 +03:00

96 lines
2.9 KiB
YAML

name: validate
on:
workflow_call:
permissions:
contents: read
jobs:
docs:
name: Check docs are buildable
runs-on: ubuntu-24.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
with:
fetch-depth: 0
- name: Set up doc directory
run: |
mkdir $HOME/output
touch $HOME/output/.nojekyll
- name: Build latest
run: |
GITHUB_SHA=$(git rev-parse HEAD)
export GITHUB_SHA
rm -rf _work/venv
make vhtml
mv _build/html/* $HOME/output/
golangci:
permissions:
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod
check-latest: true
- name: install levelzero dev
run: |
sudo apt-get update
sudo apt-get install -y libze1 libze-dev
- name: golangci-lint
uses: golangci/golangci-lint-action@1481404843c368bc19ca9406f87d6e0fc97bdcfd # v7
with:
version: v2.1.6
args: -v --timeout 5m
build:
name: Build and check device plugins
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod
check-latest: true
- name: install levelzero dev
run: |
sudo apt-get update
sudo apt-get install -y libze1 libze-dev
- name: Check Dockerfiles
run: make check-dockerfiles
- run: make go-mod-tidy
- run: make BUILDTAGS=kerneldrv
- run: make test BUILDTAGS=kerneldrv
env:
UNITTEST: 1
- run: make check-github-actions
#- name: Codecov report
# run: bash <(curl -s https://codecov.io/bash)
envtest:
name: Test APIs using envtest
runs-on: ubuntu-24.04
strategy:
matrix:
version:
- 1.30.x
- 1.31.x
- 1.32.x
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
- uses: actions/setup-go@0aaccfd150d50ccaeb58ebd88d36e91967a5f35b # v5
with:
go-version-file: go.mod
check-latest: true
- name: Install envtest and k8s control plane
run: |
go install sigs.k8s.io/controller-runtime/tools/setup-envtest@latest
setup-envtest use ${{ matrix.version }}
- name: Run envtest
run: |
KUBEBUILDER_ASSETS=$(setup-envtest use -i -p path ${{ matrix.version }}) make envtest