Files
static-pages/.github/workflows/test.yml
T
renovate[bot] d02adb0d3e chore(deps): update github-actions (#303)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2025-12-18 17:59:45 +00:00

74 lines
1.7 KiB
YAML

name: Test
on:
workflow_dispatch:
pull_request:
push:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
app_name: ['root', 'api', 'awesome', 'my', 'get', 'buy', 'datasets']
defaults:
run:
working-directory: apps/${{ matrix.app_name }}.immich.app
steps:
- name: Checkout code
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@41ff72655975bd51cab0327fa583b6e92b6d3061 # v4.2.0
- name: Setup Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
with:
node-version-file: './.nvmrc'
cache: 'pnpm'
cache-dependency-path: '**/pnpm-lock.yaml'
- name: Install
run: pnpm install
- name: Lint
run: pnpm lint
if: ${{ !cancelled() }}
- name: Format
run: pnpm format
if: ${{ !cancelled() }}
- name: Type check
run: pnpm check
if: ${{ !cancelled() }}
- name: Test
run: pnpm test
if: ${{ !cancelled() }}
- name: Check for app backend
id: check-backend
run: |
if [ -d "backend" ]; then
echo "has_backend=true" >> $GITHUB_ENV
else
echo "has_backend=false" >> $GITHUB_ENV
fi
- name: Test backend
if: ${{ env.has_backend == 'true' }}
working-directory: 'apps/${{ matrix.app_name }}.immich.app/backend'
run: |
pnpm install
pnpm test