Skip to content

Commit

Permalink
ci: merge lint and build-test steps
Browse files Browse the repository at this point in the history
  • Loading branch information
PabloCastellano committed Jun 20, 2024
1 parent 5b54f15 commit 09e6633
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 26 deletions.
13 changes: 4 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Linter
build-test:
name: Run tests
runs-on: ubuntu-latest

steps:
Expand All @@ -20,6 +20,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: cargo fmt
Expand All @@ -33,14 +34,8 @@ jobs:
with:
args: --all --all-features

build-test:
name: Run tests
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose
13 changes: 4 additions & 9 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Linter
build-test:
name: Run tests
runs-on: ubuntu-latest

steps:
Expand All @@ -20,6 +20,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: cargo fmt
Expand All @@ -33,15 +34,9 @@ jobs:
with:
args: --all --all-features

build-test:
name: Run tests
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

Expand Down
12 changes: 4 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ env:

jobs:

lint:
build-test:
name: Run tests
runs-on: ubuntu-latest

steps:
Expand All @@ -21,6 +22,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- run: rustup override set ${{steps.toolchain.outputs.name}}

- name: cargo fmt
Expand All @@ -34,15 +36,9 @@ jobs:
with:
args: --all --all-features

build-test:
name: Run tests
runs-on: ubuntu-latest
needs: lint

steps:
- uses: actions/checkout@v3
- name: Build
run: cargo build --verbose

- name: Run tests
run: cargo test --verbose

Expand Down

0 comments on commit 09e6633

Please sign in to comment.