Skip to content

Hardening/beta 15

Hardening/beta 15 #486

Workflow file for this run

name: Fast Checks
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
unit:
name: Format And Unit Tests
runs-on: ubuntu-latest
timeout-minutes: 20
env:
GOTOOLCHAIN: auto
steps:
- name: Check out repository
uses: actions/checkout@v7
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true
- name: Install unit-test tools
shell: bash
run: |
sudo apt-get update
sudo apt-get install --yes --no-install-recommends mtools
- name: Show Go version
run: go version
- name: Resolve comparison range
id: comparison
shell: bash
run: |
if [ "${{ github.event_name }}" = "pull_request" ]; then
range="origin/${{ github.base_ref }}...HEAD"
elif [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
range="origin/main...HEAD"
elif [ "${{ github.event.before }}" != "0000000000000000000000000000000000000000" ]; then
range="${{ github.event.before }}..HEAD"
else
range="$(git hash-object -t tree /dev/null)..HEAD"
fi
echo "range=$range" >> "$GITHUB_OUTPUT"
- name: Run fast checks
run: scripts/check-fast "${{ steps.comparison.outputs.range }}"
# VM/libvirt/KVM, mkosi artifact builds, and publishing are intentionally
# excluded from this low-cost workflow. Run VM gates with
# scripts/vmtest-run on a capable host; hosted orchestration is not yet
# available.