Skip to content

chore(deps-dev): bump the npm-development group across 1 directory with 5 updates #1882

chore(deps-dev): bump the npm-development group across 1 directory with 5 updates

chore(deps-dev): bump the npm-development group across 1 directory with 5 updates #1882

Workflow file for this run

name: Validate PRs
on:
pull_request:
branches: [ main ]
jobs:
check-sources:
name: Check sources
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Setup Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version-file: 'go.mod'
- name: Check go.mod
shell: bash
run: |
go mod tidy
if ! git diff --quiet; then
echo "Go modules need tidying (go mod tidy)"
exit 1
fi
- name: Check format
shell: bash
run: |
go fmt ./...
if ! git diff --quiet; then
echo "Files are not formatted (go fmt ./...)"
exit 1
fi
- name: Check license headers
shell: bash
run: |
go install github.com/google/addlicense@latest
if ! addlicense --check -s -l apache -c "The KitOps Authors." $(find . -name '*.go'); then
echo "License headers missing from Go files (see above)."
echo "Install addlicense via 'go install github.com/google/addlicense@latest'"
echo "And run 'addlicense -s -l apache -c \"The KitOps Authors.\" \$(find . -name '*.go')'"
exit 1
fi
- name: Generate embeds
run: |
go generate ./...
- name: Check build
shell: bash
run: |
if ! go build -o kit; then
echo "Project does not build"
exit 1
fi
- name: Run tests
shell: bash
run: |
if ! go test ./... -v; then
echo "Project tests failed"
exit 1
fi
- name: Test Vitepress includes
shell: bash
run: |
grep -rnw '@include' --exclude-dir docs/node_modules docs | while read -r line; do
file="${line%%:*}"
include="${line##*@include: }"
include="${include%%-->}"
expected="$(dirname "$file")/$include"
if [ ! -f "$expected" ]; then
echo "Broken include in $file: path $expected does exist"
exit 1
fi
done
- name: Check for trailing whitespace
shell: bash
run: |
files=$(grep -E -lI --exclude '*.svg' --exclude 'docs/*' --exclude 'frontend/*' " +$" $(git ls-files) || true)
if [ ! -z $files ]; then
echo "Trailing whitespace in files:"
echo "$files"
exit 1
fi
- name: Upload build artifacts
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: pr-artifacts-${{ matrix.os }}
retention-days: 3
path: |
./kit*
check-container-build:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@96fe6ef7f33517b61c61be40b68a1882f3264fb8 # v4.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@37fe631027851001ddb9b187196cc803df7f5f0e # v4.3.0
- name: Checkout
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
- name: Check kit container build
uses: docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
with:
platforms: linux/amd64,linux/arm64
push: false
context: .
file: build/dockerfiles/Dockerfile
build-args: |
KIT_VERSION=${{ github.ref_name }}