From 7286ee29637dbc694f769b618259eb9f75bab0fa Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 22 Aug 2026 16:59:34 +0900 Subject: ci: setup GitHub Actions --- .github/workflows/test.yaml | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/test.yaml (limited to '.github') diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..27f545a5 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,39 @@ +name: Test + +on: + push: + branches: [main] + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - run: nix fmt -- --ci + + tests: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - uses: cachix/install-nix-action@v25 + with: + nix_path: nixpkgs=channel:nixos-unstable + + - uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}-${{ github.sha }} + restore-keys: cargo-${{ hashFiles('rust-toolchain.toml', 'Cargo.lock') }}- + + - run: nix develop --command just check -- cgit v1.3.1-4-g156e