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 May 29, 2021
1 parent 5b92f98 commit b2a98ef
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 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,12 @@ 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
- run: ./scripts/Format-Build-Macro.ps1
- run: git diff --exit-code || (echo '::error::Some `build!` macros were improperly formatted. Please run `./scripts/Format-Build-Macro.ps1` and push again'; exit 1)
shell: bash

0 comments on commit b2a98ef

Please sign in to comment.