-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (52 loc) · 1.36 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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