Skip to content

style: format with carp-fmt 0.1.0; add to CI gate #7

style: format with carp-fmt 0.1.0; add to CI gate

style: format with carp-fmt 0.1.0; add to CI gate #7

Workflow file for this run

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