mirror of
https://github.com/actualbudget/actual.git
synced 2026-07-16 15:14:02 -05:00
Adds the knip tool with a monorepo-tuned config (knip.json) and a CI gate in check.yml, plus the dead-code and dependency cleanup it surfaced. The unused-export/type/duplicate rules are disabled so exporting an unused symbol is allowed. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
148 lines
4.4 KiB
YAML
148 lines
4.4 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
merge_group:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
jobs:
|
|
setup:
|
|
runs-on: depot-ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
constraints:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Check dependency version consistency
|
|
run: yarn constraints
|
|
- name: Check tsconfig project references are in sync
|
|
run: yarn check:tsconfig-references
|
|
lint:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Lint
|
|
run: yarn lint
|
|
knip:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Build plugins service
|
|
run: yarn build:plugins-service
|
|
- name: Check for unused files, dependencies and exports
|
|
run: yarn knip
|
|
typecheck:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Typecheck
|
|
run: yarn typecheck
|
|
validate-cli:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Build Web
|
|
run: yarn build:server
|
|
- name: Check that the built CLI works
|
|
run: node packages/sync-server/build/bin/actual-server.js --version
|
|
test:
|
|
needs: setup
|
|
runs-on: depot-ubuntu-latest
|
|
permissions:
|
|
contents: read
|
|
id-token: write # Authenticate to Depot via GitHub OIDC for test reporting
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Test
|
|
run: yarn test
|
|
- name: Report test results to Depot
|
|
uses: depot/test-report-action@2ad5779840a9c63e884fa26f11d019768a27a941 # v1.0.1
|
|
if: ${{ !cancelled() && github.event_name == 'push' }}
|
|
with:
|
|
path: |
|
|
bin/test-results/junit*.xml
|
|
packages/*/test-results/junit*.xml
|
|
check-gh-actions:
|
|
runs-on: depot-ubuntu-latest
|
|
permissions:
|
|
security-events: write
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- uses: zizmorcore/zizmor-action@71321a20a9ded102f6e9ce5718a2fcec2c4f70d8 # v0.5.2
|
|
|
|
migrations:
|
|
needs: setup
|
|
if: github.event_name == 'pull_request'
|
|
runs-on: depot-ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
|
with:
|
|
persist-credentials: false
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
with:
|
|
download-translations: 'false'
|
|
- name: Check migrations
|
|
run: yarn workspace @actual-app/ci-actions tsx bin/check-migrations.ts
|