Mirrors the conventions used in ../yams: a sectioned .gitignore, thin .githooks dispatchers over runnable scripts/, release-please config and manifest, conventional-commit linting, CODEOWNERS, a PR template with a rule-precision checkbox, and tests + commitlint workflows. CI calls scripts/lint.sh so local hooks and CI cannot drift.
66 lines
1.4 KiB
YAML
66 lines
1.4 KiB
YAML
name: Tests
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
quality:
|
|
name: Static Analysis
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Dart
|
|
uses: dart-lang/setup-dart@v1
|
|
with:
|
|
sdk: stable
|
|
|
|
- name: Install dependencies
|
|
run: dart pub get
|
|
|
|
# Same script the pre-commit hook runs, so local and CI cannot drift.
|
|
- name: Verify formatting
|
|
run: scripts/lint.sh format
|
|
|
|
- name: Analyze
|
|
run: scripts/lint.sh analyze
|
|
|
|
test:
|
|
name: Tests
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Setup Dart
|
|
uses: dart-lang/setup-dart@v1
|
|
with:
|
|
sdk: stable
|
|
|
|
- name: Install dependencies
|
|
run: dart pub get
|
|
|
|
- name: Run tests
|
|
run: scripts/lint.sh test
|
|
|
|
# Proves the native build path works, which is the supported way to run
|
|
# pipe (JIT startup is ~30x slower on small projects).
|
|
- name: Build native binary
|
|
run: tool/build_release.sh
|