on: push: branches: - '*' paths: - src/** - static/graph* - static/welcome.toml - .forgejo/** - .justfile - Cargo.toml - Cargo.lock jobs: verify: runs-on: docker timeout-minutes: 20 container: image: rust:slim env: RUSTUP_HOME: /rust/rustup CARGO_HOME: /rust/cargo steps: - name: Install action dependencies run: > apt-get install --no-install-recommends --update -y nodejs git - name: Checkout code uses: actions/checkout@v6 with: fetch-tags: true - name: Set up Rust toolchain run: | mkdir -p "$RUSTUP_HOME" mkdir -p "$CARGO_HOME" rust_version=$( grep '^rust-version = "' Cargo.toml \ | cut -d '"' -f 2 ) # 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: Set up CI user run: | useradd -m ci chown -R ci:ci "$RUSTUP_HOME" "$CARGO_HOME" "$PWD" /nix printf '[safe]\ndirectory = %s\n' "$PWD" > /etc/gitconfig - name: Set up Nix run: | mkdir /etc/nix echo experimental-features = nix-command flakes \ >> /etc/nix/nix.conf su ci -c "\ sh -c 'curl -L https://nixos.org/nix/install | bash -s -- --no-daemon' \ " - name: Set up Nix development shell run: su ci -c "nix develop --command just smoke" - name: Assess run: su ci -c "nix develop --command just verify"