-
-
Notifications
You must be signed in to change notification settings - Fork 18
61 lines (55 loc) · 1.91 KB
/
push-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
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Testing
# This workflow can be used for pushing to the production server and will only be ran when code is pushed to the main branch
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
container: node:18
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
env:
POSTGRES_PASSWORD: 123
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
# Docker Hub image
image: redis
# Set health checks to wait until postgres has started
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v2
- run: |
npm i -g pnpm
pnpm i
- run: pnpm run prisma:migrate_dev
env:
DATABASE_URL: 'postgresql://postgres:123@postgres:5432/postgres'
DATABASE_DIRECT_URL: 'postgresql://postgres:123@postgres:5432/postgres'
- run: pnpm build
env:
DATABASE_URL: 'postgresql://postgres:123@postgres:5432/postgres'
DATABASE_DIRECT_URL: 'postgresql://postgres:123@postgres:5432/postgres'
DEV_MODE: true
REDIS_HOST: redis
REDIS_PORT: 6379
JWT_SECRET: 'change me'
PORT: 80
MAX_CHANNELS_PER_SERVER: 100
MAX_INVITES_PER_SERVER: 10
MAX_ROLES_PER_SERVER: 50
DEFAULT_SERVER_ROLE_COLOR: '#fff'