Skip to content

Commit

Permalink
CI: Use upstream actions
Browse files Browse the repository at this point in the history
  • Loading branch information
zeenix committed Oct 11, 2024
1 parent 3580dae commit 6f383ab
Showing 1 changed file with 30 additions and 16 deletions.
46 changes: 30 additions & 16 deletions .github/workflows/rust.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,48 @@ name: Rust Linting, Building & Testing

on:
push:
branches: [main]
branches: ["main"]
pull_request:
branches: [main]
branches: ["main"]

permissions:
contents: read
env:
CARGO_TERM_COLOR: always

jobs:
test:
runs-on: ubuntu-latest
env:
RUST_LOG: trace
RUST_BACKTRACE: full
RUSTFLAGS: -D warnings
steps:
- name: Test
uses: jucr-io/github-reusable-workflows/.github/actions/cargo-test@main
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: test

fmt:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: jucr-io/github-reusable-workflows/.github/actions/cargo-fmt@main
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
override: true
components: rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check

clippy:
runs-on: ubuntu-latest
env:
RUSTFLAGS: -D warnings
steps:
- uses: jucr-io/github-reusable-workflows/.github/actions/cargo-clippy@main
- uses: actions/checkout@v4
with:
toolchain: nightly
override: true
components: clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings

0 comments on commit 6f383ab

Please sign in to comment.