diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-28 12:13:40 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2024-03-28 12:18:01 +0000 |
| commit | 11dc9fa2d8b82594d3803f12d2c5a49e57026cfb (patch) | |
| tree | 1d885fdef21a7530c1a91f848788a665d6fc9948 /.github/workflows | |
| parent | 4171733090d25732029a149cf0976c6b1103d0ea (diff) | |
build: use nix for tests ci
using the same dependancies in ci as in development
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/build_test.yaml | 30 | ||||
| -rw-r--r-- | .github/workflows/check_rustfmt_clippy.yaml | 26 | ||||
| -rw-r--r-- | .github/workflows/clippy_rustfmt_test.yaml | 16 |
3 files changed, 16 insertions, 56 deletions
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 @@ | |||
| 1 | on: push | ||
| 2 | |||
| 3 | name: build test | ||
| 4 | |||
| 5 | jobs: | ||
| 6 | ci: | ||
| 7 | runs-on: ubuntu-latest | ||
| 8 | timeout-minutes: 8 | ||
| 9 | strategy: | ||
| 10 | matrix: | ||
| 11 | rust: | ||
| 12 | - stable | ||
| 13 | - nightly | ||
| 14 | |||
| 15 | steps: | ||
| 16 | - uses: actions/checkout@v2 | ||
| 17 | |||
| 18 | - uses: actions-rs/toolchain@v1 | ||
| 19 | with: | ||
| 20 | profile: minimal | ||
| 21 | toolchain: ${{ matrix.rust }} | ||
| 22 | override: true | ||
| 23 | |||
| 24 | - uses: actions-rs/cargo@v1 | ||
| 25 | with: | ||
| 26 | command: build | ||
| 27 | |||
| 28 | - uses: actions-rs/cargo@v1 | ||
| 29 | with: | ||
| 30 | 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 @@ | |||
| 1 | on: push | ||
| 2 | |||
| 3 | name: check rustfmt | ||
| 4 | |||
| 5 | jobs: | ||
| 6 | ci: | ||
| 7 | runs-on: ubuntu-latest | ||
| 8 | strategy: | ||
| 9 | matrix: | ||
| 10 | rust: | ||
| 11 | - nightly | ||
| 12 | |||
| 13 | steps: | ||
| 14 | - uses: actions/checkout@v2 | ||
| 15 | |||
| 16 | - uses: actions-rs/toolchain@v1 | ||
| 17 | with: | ||
| 18 | profile: minimal | ||
| 19 | toolchain: ${{ matrix.rust }} | ||
| 20 | override: true | ||
| 21 | components: rustfmt | ||
| 22 | |||
| 23 | - uses: actions-rs/cargo@v1 | ||
| 24 | with: | ||
| 25 | command: fmt | ||
| 26 | 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 @@ | |||
| 1 | on: push | ||
| 2 | |||
| 3 | name: build test | ||
| 4 | |||
| 5 | jobs: | ||
| 6 | ci: | ||
| 7 | runs-on: ubuntu-latest | ||
| 8 | timeout-minutes: 8 | ||
| 9 | steps: | ||
| 10 | - uses: actions/checkout@v3 | ||
| 11 | - uses: cachix/install-nix-action@v22 | ||
| 12 | with: | ||
| 13 | nix_path: nixpkgs=channel:nixos-unstable | ||
| 14 | - run: nix develop --command cargo clippy | ||
| 15 | - run: nix develop --command cargo fmt --all -- --check | ||
| 16 | - run: nix develop --command cargo test | ||