From ce1656e3768af75105ecf5b9f3d57be98453dd32 Mon Sep 17 00:00:00 2001 From: mat <27899617+mat-1@users.noreply.github.com> Date: Mon, 1 Dec 2025 17:18:33 -0600 Subject: 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 --- .github/workflows/check.yml | 27 --------------------------- .github/workflows/ci.yml | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 27 deletions(-) delete mode 100644 .github/workflows/check.yml create mode 100644 .github/workflows/ci.yml (limited to '.github/workflows') 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 -- cgit v1.2.3