Files
fluxer/.github/workflows/dart-sdk-validation.yaml
T

57 lines
1.5 KiB
YAML

# SPDX-License-Identifier: AGPL-3.0-or-later
name: Dart SDK Validation
on:
pull_request:
permissions:
contents: read
pull-requests: read
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
openapi-drift:
name: Detect OpenAPI schema drift
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- name: Checkout fluxer
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
with:
persist-credentials: false
- name: Set up Rust toolchain (CI helpers)
uses: dtolnay/rust-toolchain@02cb101ec7c40f2c49e1d9714d64511d8e1b74de
with:
toolchain: "1.98.1"
- name: Install pnpm
uses: pnpm/action-setup@ea17c68df8912ef543352723c149a84f56e3d413
- name: Install Node.js
uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020
with:
node-version: '26'
cache: 'pnpm'
- name: Install dependencies
run: >-
tools/ci/run.sh ci
--step install_dependencies
- name: Generate OpenAPI schemas
run: pnpm openapi:generate
- name: Validate OpenAPI schemas
run: pnpm openapi:validate
- name: Check drift of OpenAPI schemas
run: |
if ! git diff --exit-code -- fluxer_api/src/api/openapi/openapi.json fluxer_admin/openapi-admin.json; then
echo "::error::OpenAPI schemas are outdated."
exit 1
fi