Linden Crandall 5075f5c5d8
Some checks are pending
Automatisch Backend Tests / test (push) Waiting to run
Automatisch CI / linter (push) Waiting to run
Automatisch CI / start-backend-server (push) Waiting to run
Automatisch CI / start-backend-worker (push) Waiting to run
Automatisch CI / build-web (push) Waiting to run
Automatisch UI Tests / test (push) Waiting to run
commit upstream files
2025-02-06 04:14:18 +09:00

52 lines
1.3 KiB
YAML

name: Automatisch Backend Tests
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
test:
timeout-minutes: 60
runs-on:
- ubuntu-latest
services:
postgres:
image: postgres:14.5-alpine
env:
POSTGRES_DB: automatisch_test
POSTGRES_USER: automatisch_test_user
POSTGRES_PASSWORD: automatisch_test_user_password
options: >-
--health-cmd "pg_isready -U automatisch_test_user -d automatisch_test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
redis:
image: redis:7.0.4-alpine
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Install dependencies
run: yarn
working-directory: packages/backend
- name: Copy .env-example.test file to .env.test
run: cp .env-example.test .env.test
working-directory: packages/backend
- name: Run tests
run: yarn test:coverage
working-directory: packages/backend