diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index f64cd2d..c10250d 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -1,20 +1,34 @@ -name: Check Rust +name: CI on: [push, pull_request] jobs: - build: - name: Check Rust + test: + name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 - - name: Check - run: cargo check + - run: cargo test - - name: Check clippy lint - uses: clechasseur/rs-clippy-check@80bcfb7d14c9bb0415d025602b7fabcf9463becd # v3.0.4 + format: + name: Format + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - run: cargo fmt --all -- --check + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - uses: clechasseur/rs-clippy-check@80bcfb7d14c9bb0415d025602b7fabcf9463becd # v3.0.4 with: args: -- -D warnings - - name: Test - run: cargo test + check: + name: Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 + - run: cargo check