ci: split checking formatting off into its own job that only needs to run once

This commit is contained in:
J / Jacob Babich
2024-10-04 17:01:45 -04:00
parent 65487b2378
commit cd788e1ab8

View File

@@ -10,6 +10,19 @@ env:
CARGO_TERM_COLOR: always CARGO_TERM_COLOR: always
jobs: jobs:
formatting:
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install stable Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Formatting
run: cargo fmt --check --verbose
check-build-and-test: check-build-and-test:
strategy: strategy:
matrix: matrix:
@@ -52,9 +65,6 @@ jobs:
- name: Check - name: Check
run: cargo check --verbose --target ${{ matrix.supporteds.target }} run: cargo check --verbose --target ${{ matrix.supporteds.target }}
- name: Formatting
run: cargo fmt --check --verbose --target ${{ matrix.supporteds.target }}
- name: Build - name: Build
run: cargo build --verbose --target ${{ matrix.supporteds.target }} run: cargo build --verbose --target ${{ matrix.supporteds.target }}