Skip to content

Commit

Permalink
chore(ci): Use Justfile Targets in Github Actions (#219)
Browse files Browse the repository at this point in the history
### Description

Small PR that re-jiggers github actions to use justfile targets for
easier local reproducibility.
  • Loading branch information
refcell authored Nov 4, 2024
1 parent 8c0562d commit 4de6e56
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,12 +57,13 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@stable
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo test --workspace --doc
- run: cargo test --all-features --workspace --doc
- run: just test-docs

wasm-unknown:
runs-on: ubuntu-latest
Expand Down Expand Up @@ -129,16 +130,15 @@ jobs:
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- uses: taiki-e/install-action@just
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: clippy
- uses: Swatinem/rust-cache@v2
with:
cache-on-failure: true
- run: cargo +stable clippy --workspace --all-targets --all-features
env:
RUSTFLAGS: -D warnings
- run: just clippy

docs:
runs-on: ubuntu-latest
Expand Down
9 changes: 6 additions & 3 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ test:

# Test the Rust documentation
test-docs:
cargo test --doc --all --locked
cargo test --doc --all

# Lint the workspace for all available targets
lint: lint-native lint-docs

# Lint the workspace
lint-native: fmt-check lint-docs
cargo +nightly clippy --workspace --all --all-features --all-targets -- -D warnings
lint-native: fmt-check lint-docs clippy

# Checks the workspace with clippy
clippy:
cargo +stable clippy --workspace --all-features --all-targets -- -D warnings

# Check the formatting of the workspace
fmt-check:
Expand Down
1 change: 1 addition & 0 deletions deny.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ allow = [
"ISC",
"Unicode-DFS-2016",
"Unlicense",
"Unicode-3.0",
"MPL-2.0",
"Zlib",
# https://github.com/briansmith/ring/issues/902
Expand Down

0 comments on commit 4de6e56

Please sign in to comment.