Skip to content

refactor(frontend): consolidate api utility proxies and error handler… #452

refactor(frontend): consolidate api utility proxies and error handler…

refactor(frontend): consolidate api utility proxies and error handler… #452

Workflow file for this run

name: CI - Lint & Test
on:
pull_request:
branches: [main]
paths:
- 'api/**'
- 'frontend/**'
- 'shared/**'
- '**/*.md'
push:
branches: [main]
paths:
- 'api/**'
- 'frontend/**'
- 'shared/**'
- '**/*.md'
workflow_dispatch:
env:
NODE_VERSION: 24
jobs:
changes:
runs-on: ubuntu-latest
outputs:
api: ${{ steps.filter.outputs.api }}
frontend: ${{ steps.filter.outputs.frontend }}
shared: ${{ steps.filter.outputs.shared }}
markdown: ${{ steps.filter.outputs.markdown }}
steps:
- uses: actions/checkout@v7
- uses: dorny/paths-filter@v4
id: filter
with:
filters: |
api:
- 'api/**'
frontend:
- 'frontend/**'
shared:
- 'shared/**'
markdown:
- '**/*.md'
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run lint
run: npm run lint
test-api:
runs-on: ubuntu-latest
needs: [changes, lint]
if: ${{ needs.changes.outputs.api == 'true' || needs.changes.outputs.shared == 'true' }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:api
test-frontend:
runs-on: ubuntu-latest
needs: [changes, lint]
if: ${{ needs.changes.outputs.frontend == 'true' || needs.changes.outputs.shared == 'true' }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run tests
run: npm run test:frontend
markdownlint:
runs-on: ubuntu-latest
needs: changes
if: ${{ needs.changes.outputs.markdown == 'true' }}
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v6
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Run markdownlint
run: npx markdownlint-cli "**/*.md" --ignore "**/node_modules/**"