don't add newline when already present #94
Workflow file for this run
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: apple_x64 | |
- os: windows | |
triple: x86_64-w64-mingw32 | |
name: windows_x64 | |
include: | |
- target: | |
os: linux | |
builder: ubuntu-20.04 | |
- target: | |
os: macosx | |
builder: macos-11 | |
- 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 | |
- 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 build | |
- name: Check formatting | |
run: | | |
! ./nph --check tests/before || echo "Failed before check" | |
./nph --check tests/after || echo "Failed after check" | |
./nph src | |
git diff --exit-code || echo "Failed diff" |