format: align-under-first-arg style (carp-fmt main) #15
This file contains hidden or 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: | |
| branches: [main, master] | |
| pull_request: | |
| workflow_dispatch: | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Carp | |
| uses: carpentry-org/setup-carp@v1 | |
| - name: Run tests | |
| run: | | |
| set -euo pipefail | |
| carp -x test/carp-reader.carp | |
| - name: Install angler | |
| run: | | |
| set -euo pipefail | |
| git clone --depth 1 https://github.com/carpentry-org/angler /tmp/angler | |
| (cd /tmp/angler && carp -b main.carp) | |
| sudo install -m 755 /tmp/angler/out/angler /usr/local/bin/ | |
| - name: Install carp-fmt | |
| run: | | |
| set -euo pipefail | |
| git clone --depth 1 https://github.com/carpentry-org/carp-fmt /tmp/carp-fmt | |
| (cd /tmp/carp-fmt && carp -b main.carp) | |
| sudo install -m 755 /tmp/carp-fmt/out/carp-fmt /usr/local/bin/ | |
| - name: Lint | |
| run: | | |
| angler $(find . -name '*.carp' \ | |
| -not -path './out/*' \ | |
| -not -path './docs/*' \ | |
| -not -path './.carp-src/*') | |
| - name: Format check | |
| run: | | |
| carp-fmt --check $(find . -name '*.carp' \ | |
| -not -path './out/*' \ | |
| -not -path './docs/*' \ | |
| -not -path './.carp-src/*') | |
| - name: Generate docs | |
| run: carp -x gendocs.carp |