fix comment after if/while/case (fixes #71) (#78) #277
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: [push, pull_request] | |
concurrency: # Cancel stale PR builds (but not push builds) | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
target: | |
- os: linux | |
triple: x86_64-linux-musl | |
name: linux_x64 | |
- os: macosx | |
triple: x86_64-apple-darwin14 | |
name: macosx_x64 | |
- os: windows | |
triple: x86_64-w64-mingw32 | |
name: windows_x64 | |
include: | |
- target: | |
os: linux | |
builder: ubuntu-20.04 | |
- target: | |
os: macosx | |
builder: macos-12 | |
- target: | |
os: windows | |
builder: windows-2019 | |
defaults: | |
run: | |
shell: bash | |
name: CI '${{ matrix.target.name }}' | |
runs-on: ${{ matrix.builder }} | |
steps: | |
- name: Set git to use LF | |
run: | | |
git config --global core.autocrlf false | |
git config --global core.eol lf | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: jiro4989/setup-nim-action@v2 | |
with: | |
nim-version: '2.0.2' # default is 'stable' | |
repo-token: ${{ secrets.GITHUB_TOKEN }} | |
# - name: Fetch nimble | |
# uses: robinraju/release-downloader@v1.8 | |
# with: | |
# repository: "nim-lang/nimble" | |
# tag: "latest" | |
# fileName: "nimble-${{matrix.target.name}}.tar.gz" | |
# extract: false | |
# - name: Setup env | |
# run: | | |
# # extract: true doesn't work on osx :/ | |
# tar xvf nimble-${{matrix.target.name}}.tar.gz | |
# # needed for nimble on windows | |
# curl -L "https://curl.se/ca/cacert.pem" -o cacert.pem | |
# echo "$PWD" >> $GITHUB_PATH | |
- name: Build nph | |
run: | | |
ls -l | |
# nimble setup -l | |
nimble install -y | |
nimble build | |
- name: Check formatting | |
run: | | |
! ./nph --check tests/before | |
./nph --check tests/after | |
./nph src | |
git diff --exit-code | |