From cbdac8a5ac0711402dbf59f9a285860047ba5fdb Mon Sep 17 00:00:00 2001 From: ThetaSinner Date: Tue, 5 Mar 2024 18:59:43 +0000 Subject: [PATCH] Simple CI pipeline --- .github/workflows/test.yaml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 00000000..8ab208ec --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,35 @@ +name: "test" +on: + push: + branches: [ main, develop ] + pull_request: + branches: [ main, develop ] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Install nix + uses: cachix/install-nix-action@v25 + with: + install_url: https://releases.nixos.org/nix/nix-2.20.4/install + extra_nix_config: | + experimental-features = flakes nix-command + + - uses: cachix/cachix-action@v14 + with: + name: holochain-ci + + - name: Lint + run: | + nix develop --command bash -c "cargo clippy --all-targets --all-features -- -D warnings" + + - name: Check formatting + run: | + nix develop --command bash -c "cargo fmt --all -- --check" + + - name: Unit tests + run: | + nix develop --command bash -c "cargo test" \ No newline at end of file