35 lines
951 B
YAML
35 lines
951 B
YAML
name: ci
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Install tools
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y shellcheck jq
|
|
python3 -m pip install --break-system-packages ruff
|
|
|
|
# LINT_STRICT makes a missing tool a failure instead of a skip: a runner
|
|
# image that quietly drops shellcheck would otherwise report green.
|
|
- name: Lint
|
|
run: LINT_STRICT=1 LINT_NO_NIX=1 bin/lint.sh
|
|
|
|
# Separate job: installing nix costs more than every other check together,
|
|
# and a failure here should not hide the lint results.
|
|
nix:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
extra_nix_config: "experimental-features = nix-command flakes"
|
|
- run: nix flake check --no-write-lock-file
|