Files
warewulf/.github/workflows/check.yml
Jonathon Anderson 53c939608b Enforce updating license dependencies
- Closes: #1148

Signed-off-by: Jonathon Anderson <janderson@ciq.com>
2025-01-21 09:42:27 -07:00

111 lines
2.8 KiB
YAML

---
name: check
on:
push:
branches:
- main
- 'v4.*.x'
paths-ignore:
- 'docs/**'
pull_request:
branches:
- main
- 'v4.*.x'
paths-ignore:
- 'docs/**'
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check Warewulf code with golang linter (golang ${{ matrix.go-version }})
run: make lint
vet:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Vet Warewulf code (golang ${{ matrix.go-version }})
run: make vet
fmt:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check Warewulf code for formatting (golang ${{ matrix.go-version }})
run: test "$(make -s fmt | wc -l)" == 0
deadcode:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Check for dead Warewulf code (golang ${{ matrix.go-version }})
run: make deadcode
licenses:
runs-on: ubuntu-latest
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
- name: Check for out-of-date license information
run: make LICENSE_DEPENDENCIES.md && git diff --quiet LICENSE_DEPENDENCIES.md
testsuite:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Run the test suite (golang ${{ matrix.go-version }})
run: make test
build:
runs-on: ubuntu-latest
strategy:
matrix:
go-version: ['1.21', '1.22', '1.23']
steps:
- name: Checkout Warewulf
uses: actions/checkout@v4
- uses: ./.github/actions/prepare
with:
go-version: ${{ matrix.go-version }}
- name: Build Warewulf (golang ${{ matrix.go-version }})
run: make all