Skip to content

chore: add more testing. #164

chore: add more testing.

chore: add more testing. #164

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
merge_group:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
sandbox-feedback-disable: true
- target: x86_64-unknown-linux-gnu
os: ubuntu-latest
- target: x86_64-unknown-linux-musl
os: ubuntu-latest
- target: i686-unknown-linux-musl
os: ubuntu-latest
- target: aarch64-unknown-linux-musl
os: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Enable unprivileged user namespaces
run: |
sudo sysctl -w kernel.unprivileged_userns_clone=1
sudo sysctl -w kernel.apparmor_restrict_unprivileged_userns=0
- name: Install busybox for path_config tests
run: |
sudo apt-get install -y --no-install-recommends busybox-static
echo "NIX_USER_CHROOT_TEST_BUSYBOX=$(which busybox)" >> "$GITHUB_ENV"
- if: ${{ matrix.sandbox-feedback-disable }}
name: Disable sandbox Feedback
run: echo "sandbox-fallback = false" >> ~/.config/nix/nix.conf
- name: Test
run: cargo test --target ${{ matrix.target }}
lint:
name: Linting (fmt + clippy)
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
- name: Format check
run: cargo fmt -- --check