en/.forgejo/workflows/verify.yaml
jutty 014a30f3f6
Some checks failed
/ verify (push) Has been cancelled
CI: Wrap nix devshell invocation with just
This commit also adds the flake version to the justfile's version check.
2026-06-29 03:52:44 -03:00

55 lines
1.4 KiB
YAML

on:
push:
branches:
- '*'
paths:
- src/**
- static/*
- .forgejo/**
- .justfile
- Cargo.*
jobs:
verify:
runs-on: docker
timeout-minutes: 20
container:
image: rust:slim
steps:
- name: Set up action dependencies
run: |
apt-get install --no-install-recommends --update -y \
nodejs git nix
echo experimental-features = nix-command flakes >> /etc/nix/nix.conf
echo 'export PATH=$PATH:$HOME/.nix-profile/bin' >> /etc/profile
nix profile install nixpkgs#just # trixie is on nix 2.26
- name: Checkout code
uses: actions/checkout@v6
with:
fetch-tags: true
- name: Cleanup checkout action dependencies
run: apt-get purge -y nodejs git
- name: Set up CI user
run: useradd -m ci && chown -R ci /nix .
- name: Set up Rust toolchain
run: |
rust_version=$(sed -nE 's/^rust-version = "(.*)"$/\1/p' Cargo.toml)
su ci -c "
rustup default '$rust_version'
rustup toolchain install nightly
rustup component add llvm-tools
rustup component add --toolchain nightly rustfmt clippy
rustup target add \
x86_64-unknown-linux-musl \
x86_64-unknown-linux-gnu
"
- name: Assess
run: |
command -v just
just ci-nix "$PATH" verify