Skip to content

Rewrite in Go

Rewrite in Go #89

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
check:
name: Check / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v7
with:
version: v2.11.3
args: --help
- uses: actions/setup-node@v4
with:
node-version: '22'
- name: Install Prism
run: npm install -g @stoplight/prism-cli
- name: Cache BATS
id: cache-bats
uses: actions/cache@v4
with:
path: ~/bats-install
key: bats-1.13.0-${{ runner.os }}
- name: Install BATS
if: steps.cache-bats.outputs.cache-hit != 'true'
run: |
git clone --depth 1 --branch v1.13.0 https://github.com/bats-core/bats-core.git /tmp/bats-core
/tmp/bats-core/install.sh "$HOME/bats-install"
- name: Add BATS to PATH
run: echo "$HOME/bats-install/bin" >> "$GITHUB_PATH"
- name: Install jq
run: |
if command -v jq &>/dev/null; then
echo "jq already installed: $(jq --version)"
elif [[ "$RUNNER_OS" == "Linux" ]]; then
sudo apt-get update && sudo apt-get install -y jq
else
brew install jq
fi
- name: Run checks
run: make check