Skip to content

release 20240410 (0.3.2) #142

release 20240410 (0.3.2)

release 20240410 (0.3.2) #142

Workflow file for this run

name: Format
on: [pull_request]
jobs:
filter:
runs-on: ubuntu-latest
outputs:
filter: ${{ steps.filter.outputs.backend == 'true' || steps.filter.outputs.workflows == 'true' }}
steps:
- uses: actions/checkout@v2
- uses: dorny/paths-filter@v2
id: filter
with:
filters: .github/filters.yml
fmt:
name: fmt
needs: filter
if: ${{ needs.filter.outputs.filter == 'true' }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest ]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run Cargo fmt
run: cargo fmt --all -- --check
env:
RUST_BACKTRACE: 1
aggregate:
name: fmt:required
runs-on: ubuntu-latest
needs: [fmt, filter]
if: ${{ always() }}
steps:
- name: Check fmt result
if: ${{ needs.fmt.result != 'success' && needs.filter.outputs.filter == 'true' }}
run: exit 1