mcporter/.github/workflows/ci.yml
2026-05-28 20:53:18 +02:00

74 lines
1.7 KiB
YAML

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
jobs:
build:
name: build (${{ matrix.os }})
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-15, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
- run: corepack enable
- run: corepack prepare pnpm@10.33.2 --activate
- name: Locate pnpm store
id: pnpm-store
shell: bash
run: echo "path=$(pnpm store path --silent)" >> "$GITHUB_OUTPUT"
- uses: actions/cache@v5
with:
path: ${{ steps.pnpm-store.outputs.path }}
key: ${{ runner.os }}-pnpm-${{ hashFiles('pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-
- run: pnpm install --frozen-lockfile
- run: pnpm --version
- run: pnpm check
- name: Verify generated schema is committed
if: matrix.os == 'ubuntu-latest'
shell: bash
run: |
pnpm generate:schema
pnpm exec oxfmt mcporter.schema.json
git diff --exit-code -- mcporter.schema.json
- name: Build docs site
if: matrix.os == 'ubuntu-latest'
run: pnpm docs:site
- run: pnpm build
- name: Pack npm artifact
if: matrix.os == 'ubuntu-latest'
run: pnpm pack --pack-destination /tmp
- run: pnpm test
env:
FIRECRAWL_API_KEY: test
LINEAR_API_KEY: test