Skip to content

Commit

Permalink
Move linting to separate job. (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
wmedrano authored Dec 24, 2023
1 parent ee1112e commit 7759620
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 11 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -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
15 changes: 4 additions & 11 deletions .github/workflows/rust.yml → .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Test

on:
push:
branches: [main]
Expand All @@ -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

0 comments on commit 7759620

Please sign in to comment.