-
Notifications
You must be signed in to change notification settings - Fork 19
50 lines (42 loc) · 1.3 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
name: Test Krist
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
container: node:20
services:
mariadb:
image: mariadb:10.4
env:
MYSQL_USER: test_krist
MYSQL_DATABASE: test_krist
MYSQL_PASSWORD: test_krist
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=10
redis:
image: redis
ports:
- 6379:6379
options: --health-cmd="redis-cli ping" --health-interval=10s --health-timeout=10s --health-retries=10
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 9
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Run tests
run: pnpm run test
env:
DB_HOST: mariadb
DB_PORT: ${{ job.services.mariadb.ports[3306] }}
TEST_DB_HOST: mariadb
TEST_DB_PORT: ${{ job.services.mariadb.ports[3306] }}
TEST_DB_PASS: test_krist
REDIS_HOST: redis
REDIS_PORT: ${{ job.services.redis.ports[6379] }}
PUBLIC_URL: localhost:8080