mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-11 20:44:32 -05:00
81 lines
3.2 KiB
YAML
81 lines
3.2 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
repository_dispatch:
|
|
types: [vrt-update-applied]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }}
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# For repository_dispatch events, checkout the PR branch
|
|
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_ref || github.ref }}
|
|
repository: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_repo || github.repository }}
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
- name: Lint
|
|
run: yarn lint
|
|
typecheck:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# For repository_dispatch events, checkout the PR branch
|
|
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_ref || github.ref }}
|
|
repository: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_repo || github.repository }}
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
- name: Typecheck
|
|
run: yarn typecheck
|
|
validate-cli:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# For repository_dispatch events, checkout the PR branch
|
|
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_ref || github.ref }}
|
|
repository: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_repo || github.repository }}
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
- 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:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# For repository_dispatch events, checkout the PR branch
|
|
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_ref || github.ref }}
|
|
repository: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_repo || github.repository }}
|
|
- name: Set up environment
|
|
uses: ./.github/actions/setup
|
|
- name: Test
|
|
run: yarn test
|
|
|
|
migrations:
|
|
if: github.event_name == 'pull_request' || github.event_name == 'repository_dispatch'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
# For repository_dispatch events, checkout the PR branch
|
|
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_ref || github.ref }}
|
|
repository: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.head_repo || github.repository }}
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
- name: Check migrations
|
|
run: node ./.github/actions/check-migrations.js
|