Skip to content

Commit

Permalink
ci: Check formatting of build! macros
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Jun 7, 2021
1 parent 8ab3333 commit 198327d
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Build and Test

on:
on:
pull_request:
push:
branches:
Expand All @@ -12,7 +12,7 @@ env:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
strategy:
matrix:
include:
- os: windows-latest
Expand Down Expand Up @@ -50,3 +50,14 @@ jobs:
- name: fmt
run: cargo fmt --all -- --check
if: matrix.os == 'windows-latest' && matrix.rust == 'stable'

format-macro:
runs-on: windows-latest
name: Format `build!` macros
steps:
- uses: actions/checkout@v2
- name: Invoke `windows_fmt`
run: cargo r -p windows_fmt
- name: Diff formatting result
shell: bash
run: git diff --exit-code || (echo '::error::Some `build!` macros were improperly formatted. Please run `cargo run -p windows_fmt` and push again'; exit 1)

0 comments on commit 198327d

Please sign in to comment.