aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormat <27899617+mat-1@users.noreply.github.com>2025-12-01 17:18:33 -0600
committerGitHub <noreply@github.com>2025-12-01 17:18:33 -0600
commitce1656e3768af75105ecf5b9f3d57be98453dd32 (patch)
treeecb4319c1d612a96f26de621c897b0430b1632b1
parent0110c630aed4b1800a94c22f74a2403df6f30295 (diff)
downloadazalea-drasl-ce1656e3768af75105ecf5b9f3d57be98453dd32.tar.xz
Run `cargo test` in GitHub Actions (#288)
* run tests in github actions ci * maybe fix wrong syntax * install clippy * disable incremental compilation in ci * use Swatinem/rust-cache instead of actions/cache * don't run tests twice redundantly * formatting in ci.yml
-rw-r--r--.github/workflows/check.yml27
-rw-r--r--.github/workflows/ci.yml27
2 files changed, 27 insertions, 27 deletions
diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml
deleted file mode 100644
index 6188f070..00000000
--- a/.github/workflows/check.yml
+++ /dev/null
@@ -1,27 +0,0 @@
-on:
- push:
- pull_request:
-name: Clippy check
-jobs:
- clippy_check:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/cache@v3
- with:
- path: |
- ~/.cargo/bin/
- ~/.cargo/registry/index/
- ~/.cargo/registry/cache/
- ~/.cargo/git/db/
- target/
- key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- - uses: actions/checkout@v1
- - uses: actions-rs/toolchain@v1
- with:
- toolchain: nightly
- components: clippy
- override: true
- - uses: actions-rs/clippy-check@v1
- with:
- token: ${{ secrets.GITHUB_TOKEN }}
- args: --all-features
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..fa1cceb5
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,27 @@
+on:
+ push:
+ pull_request:
+ types: [opened, reopened]
+
+env:
+ CARGO_INCREMENTAL: 0 # required so ci doesn't run out of space
+ CARGO_TERM_COLOR: always
+
+name: Cargo clippy & test
+jobs:
+ clippy_and_test:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Nightly
+ run: rustup update nightly && rustup default nightly && rustup component add clippy
+
+ - name: Cache dependencies
+ uses: Swatinem/rust-cache@v2
+
+ - name: Clippy
+ run: cargo clippy --all-features
+
+ - name: Test
+ run: cargo test