From 527dc64a74626325d1b757c0747bb5ea312dcb1c Mon Sep 17 00:00:00 2001 From: Will Date: Sun, 24 Dec 2023 13:12:10 -0800 Subject: [PATCH] Move linting to separate job. (#192) --- .github/workflows/linting.yml | 24 +++++++++++++++++++++ .github/workflows/{rust.yml => testing.yml} | 15 ++++--------- 2 files changed, 28 insertions(+), 11 deletions(-) create mode 100644 .github/workflows/linting.yml rename .github/workflows/{rust.yml => testing.yml} (69%) diff --git a/.github/workflows/linting.yml b/.github/workflows/linting.yml new file mode 100644 index 000000000..a1d244ecc --- /dev/null +++ b/.github/workflows/linting.yml @@ -0,0 +1,24 @@ +name: Lint +on: + push: + branches: [main] + pull_request: + branches: [main] + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt update && sudo apt install jackd libjack0 libjack-dev + - name: Lint (No Features) + run: cargo clippy --all-targets --no-default-features -- -D clippy::all + - name: Lint (metadata) + run: cargo clippy --all-targets --no-default-features --features metadata -- -D clippy::all + - name: Cargo Fmt + run: cargo fmt --check diff --git a/.github/workflows/rust.yml b/.github/workflows/testing.yml similarity index 69% rename from .github/workflows/rust.yml rename to .github/workflows/testing.yml index 4e3773f2d..5158e8674 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/testing.yml @@ -1,5 +1,4 @@ name: Test - on: push: branches: [main] @@ -10,28 +9,22 @@ env: CARGO_TERM_COLOR: always jobs: - build: + test: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v2 - name: Install dependencies run: sudo apt update && sudo apt install jackd libjack0 libjack-dev - # This is required for the tests, but we start it earlier since it may # take a while to initialize. - name: Start dummy JACK server run: jackd -r -ddummy -r44100 -p1024 & - - - name: Lint (No Features) - run: cargo clippy --all-targets --no-default-features -- -D clippy::all - - name: Lint (metadata) - run: cargo clippy --all-targets --no-default-features --features metadata -- -D clippy::all - - name: Build (No Features) run: cargo build --verbose --no-default-features - name: Build (metadata) run: cargo build --verbose --no-default-features --features metadata - - name: Run Tests - run: RUST_TEST_THREADS=1 cargo test --verbose --all-features + run: cargo test --verbose --all-features + env: + RUST_TEST_THREADS: 1