Skip to content

Contract

Contract #61

Workflow file for this run

name: Contract
on:
push:
branches: [main]
pull_request:
schedule:
# Daily nightly run at 06:00 UTC catches drift from upstream API changes
# captured into fixtures/ between merges.
- cron: "0 6 * * *"
repository_dispatch:
# Fired by audd-openapi on every merge to main; re-run our parser against
# the latest spec to catch contract drift before it reaches users.
types: [openapi-updated]
permissions:
contents: read
issues: write
jobs:
contract:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: audd-node
- uses: actions/checkout@v4
with:
repository: AudDMusic/audd-openapi
path: audd-openapi
- uses: actions/setup-node@v4
with:
node-version: "20"
cache: npm
cache-dependency-path: audd-node/package-lock.json
- working-directory: audd-node
run: npm ci
- working-directory: audd-node
env:
AUDD_OPENAPI_FIXTURES: ${{ github.workspace }}/audd-openapi/fixtures
run: npx vitest run test/contract.test.ts