Files
2026-07-28 21:16:56 +01:00

57 lines
1.8 KiB
YAML

name: CI
on:
push:
jobs:
nix:
runs-on: ubuntu-26.04-vm
steps:
- uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6.1.0
- name: Install Docker
run: |
sudo apt-get update
sudo apt-get install -y docker.io
sudo chmod 666 /var/run/docker.sock
- uses: cachix/install-nix-action@8aa03977d8d733052d78f4e008a241fd1dbf36b3 # v31
with:
install_options: --yes
extra_nix_config: |
accept-flake-config = true
- name: Setup Nix S3 cache
uses: testquorum/nix-s3-generations@08090ea0b9ce0eab04ba614d887c55bdaa0a6f52 # v0.1.3
with:
s3-endpoint: 28e45df51086264c6d9cf2b5e6ecc190.r2.cloudflarestorage.com
bucket: jakehillion-nix
region: auto
aws-access-key-id: ${{ secrets.R2_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.R2_SECRET_ACCESS_KEY }}
public-key: "nixcache.jakehillion.me-1:HQsjYdrcs3ilS/ngtlbTQXU4Xfsm+va5NN7yoK0wKMg="
private-key: ${{ secrets.NIX_SIGNING_KEY }}
- uses: nicknovitski/nix-develop@9be7cfb4b10451d3390a75dc18ad0465bed4932a # v1
with:
arguments: .#ci
- name: Build all outputs
run: nix-fast-build --no-nom --flake '.#checks'
- name: Load Radicale test image
run: |
RADICALE_IMAGE=$(nix build '.#radicale-test-image' --print-out-paths)
docker load < "$RADICALE_IMAGE"
- name: Prepare test archive
run: |
SYSTEM=$(nix-instantiate --eval -E builtins.currentSystem | tr -d '"')
ARCHIVE_PATH=$(nix build ".#checks.${SYSTEM}.personal-agent-nextest-archive" --print-out-paths)
zstd "$ARCHIVE_PATH/archive.tar" -o /tmp/archive.tar.zst
- name: Run tests from archive
run: |
cargo-nextest nextest run --archive-file /tmp/archive.tar.zst --workspace-remap .