Files
static-pages/.github/workflows/test.yml
T
renovate[bot] 0edffa62c7 chore(deps): update pnpm/action-setup action to v6 (#465)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2026-04-21 11:41:24 +02: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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup pnpm
uses: pnpm/action-setup@08c4be7e2e672a47d11bd04269e27e5f3e8529cb # v6.0.0
- name: Setup Node
uses: actions/setup-node@53b83947a5a98c8d113130e565377fae1a50d02f # v6.3.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