Skip to content

Dev

Dev #101

Workflow file for this run

name: Testing
on:
pull_request:
branches:
- dev
- main
jobs:
unit-tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
package:
- core
- web
steps:
- uses: actions/checkout@v4
- name: Use caches and install dependencies if needed
uses: ./.github/actions/setup
- name: Run unit tests
run: |
cd packages/${{ matrix.package }}
pnpm run test:unit
integration-tests:
runs-on: ubuntu-latest
# TODO: use repo variables when GitHub stops auto deploying depending on environment
env:
USER_DB_USERNAME: user
USER_DB_PASSWORD: password
USER_DB_HOST: localhost
USER_DB_PORT: 5432
USER_DB_DATABASE: userdb
MAIN_REDIS_PASSWORD: password
MAIN_REDIS_HOST: localhost
MAIN_REDIS_PORT: 6379
PUBLIC_DOMAIN: localhost
PUBLIC_APP_NAME: homelab-template
strategy:
fail-fast: false
matrix:
package:
- web
steps:
- uses: actions/checkout@v4
- name: Use caches and install dependencies if needed
uses: ./.github/actions/setup
- name: Install Playwright browsers
run: pnpx playwright install --with-deps
- name: Run integration tests
run: |
cd packages/${{ matrix.package }}
pnpm run test:int