aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/test.yaml39
1 files changed, 39 insertions, 0 deletions
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