Skip to content

Commit

Permalink
Update ci.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-robbins authored Nov 21, 2023
1 parent 0373e70 commit 6467f22
Showing 1 changed file with 34 additions and 5 deletions.
39 changes: 34 additions & 5 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,43 @@
on: push
name: Clippy check
---
name: CI

on:
pull_request:
branches:
- master

# Make sure CI fails on all warnings, including Clippy lints
env:
RUSTFLAGS: "-Dwarnings"

jobs:
clippy_check:
clippy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run Clippy
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: clippy
- name: Clippy Check
run: cargo clippy --all-targets --all-features

formatting:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1

tests:
runs-on: ubuntu-latest
needs: clippy
if: ${{ github.event.clippy.conclusion == 'success' && github.event.formatting.conclusion == 'success' }}

steps:
- uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- run: cargo test --all-features

0 comments on commit 6467f22

Please sign in to comment.