intel-device-plugins-for-ku.../.github/workflows/lib-validate.yaml
Mikko Ylinen 74bee31c3d ci: update golangci-lint to v1.55.2
Signed-off-by: Mikko Ylinen <mikko.ylinen@intel.com>
2023-11-04 09:04:28 +02:00

84 lines
2.2 KiB
YAML

name: validate
on:
workflow_call:
jobs:
docs:
name: Check docs are buildable
runs-on: ubuntu-22.04
steps:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-venv
- uses: actions/checkout@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:
contents: read # for actions/checkout to fetch code
pull-requests: read # for golangci/golangci-lint-action to fetch pull requests
name: lint
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.55.2
args: -v --timeout 5m
build:
name: Build and check device plugins
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version-file: go.mod
check-latest: true
- name: Check Dockerfiles
run: make check-dockerfiles
- run: make go-mod-tidy
- run: make BUILDTAGS=kerneldrv
- run: make test BUILDTAGS=kerneldrv
- 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-22.04
strategy:
matrix:
version:
- 1.26.x
- 1.27.x
- 1.28.x
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
- 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