From 11dc9fa2d8b82594d3803f12d2c5a49e57026cfb Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 28 Mar 2024 12:13:40 +0000 Subject: build: use nix for tests ci using the same dependancies in ci as in development --- .github/workflows/build_test.yaml | 30 ----------------------------- .github/workflows/check_rustfmt_clippy.yaml | 26 ------------------------- .github/workflows/clippy_rustfmt_test.yaml | 16 +++++++++++++++ 3 files changed, 16 insertions(+), 56 deletions(-) delete mode 100644 .github/workflows/build_test.yaml delete mode 100644 .github/workflows/check_rustfmt_clippy.yaml create mode 100644 .github/workflows/clippy_rustfmt_test.yaml diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml deleted file mode 100644 index 5d2555d..0000000 --- a/.github/workflows/build_test.yaml +++ /dev/null @@ -1,30 +0,0 @@ -on: push - -name: build test - -jobs: - ci: - runs-on: ubuntu-latest - timeout-minutes: 8 - strategy: - matrix: - rust: - - stable - - nightly - - steps: - - uses: actions/checkout@v2 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - - - uses: actions-rs/cargo@v1 - with: - command: build - - - uses: actions-rs/cargo@v1 - with: - command: test diff --git a/.github/workflows/check_rustfmt_clippy.yaml b/.github/workflows/check_rustfmt_clippy.yaml deleted file mode 100644 index eec744e..0000000 --- a/.github/workflows/check_rustfmt_clippy.yaml +++ /dev/null @@ -1,26 +0,0 @@ -on: push - -name: check rustfmt - -jobs: - ci: - runs-on: ubuntu-latest - strategy: - matrix: - rust: - - nightly - - steps: - - uses: actions/checkout@v2 - - - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: ${{ matrix.rust }} - override: true - components: rustfmt - - - uses: actions-rs/cargo@v1 - with: - command: fmt - args: --all -- --check diff --git a/.github/workflows/clippy_rustfmt_test.yaml b/.github/workflows/clippy_rustfmt_test.yaml new file mode 100644 index 0000000..5253814 --- /dev/null +++ b/.github/workflows/clippy_rustfmt_test.yaml @@ -0,0 +1,16 @@ +on: push + +name: build test + +jobs: + ci: + runs-on: ubuntu-latest + timeout-minutes: 8 + steps: + - uses: actions/checkout@v3 + - uses: cachix/install-nix-action@v22 + with: + nix_path: nixpkgs=channel:nixos-unstable + - run: nix develop --command cargo clippy + - run: nix develop --command cargo fmt --all -- --check + - run: nix develop --command cargo test -- cgit v1.2.3