forked from specfy/specfy
-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (92 loc) · 2.83 KB
/
main.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Main
on:
push:
branches: [ main ]
pull_request:
types: [opened, synchronize]
jobs:
ci:
container: node:20.9.0
runs-on: ubuntu-latest
timeout-minutes: 17
services:
postgres:
image: postgres:15.5-alpine
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
elasticsearch:
image: elasticsearch:8.11.0
ports:
- "9200:9200"
- "9300:9300"
env:
discovery.type: "single-node"
discovery.seed_hosts: "[]"
xpack.security.enabled: "false"
ES_JAVA_OPTS: "-Xms400m -Xmx400m"
options: >-
--health-cmd "curl -s --fail http://localhost:9200/_cat/health || exit 1"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
DATABASE_URL: "postgres://postgres:postgres@postgres:5432/postgres?sslmode=disable"
COOKIE_SECRET: "00d0ab4f7738a83feb37f661526512063c41e49278b7c32cba87314269a5788b"
PASSWORD_SALT: "erejlksfjgfsd"
GITHUB_CLIENT_APPID: 1
GITHUB_CLIENT_ID: "RANDOM"
GITHUB_CLIENT_SECRET: "RANDOM"
GITHUB_CLIENT_PKEY: "__empty__"
GITHUB_WEBHOOKS_SECRET: "secret"
APP_HOSTNAME: "http://localhost:5173"
API_HOSTNAME: "http://localhost:3000"
DEFAULT_ACCOUNT: ""
GIVE_DEFAULT_PERMS_TO_EMAIL: ""
RESEND_KEY: "re_"
STRIPE_KEY: "RANDOM"
STRIPE_WEBHOOKS_SECRET: "RANDOM"
JWT_SECRET: "aa"
DD_API_KEY: ""
OPENAI_KEY: ""
ELASTICSEARCH_HOST: "http://elasticsearch:9200"
ELASTICSEARCH_USER: ""
ELASTICSEARCH_PWD: ""
TURBO_TOKEN: ${{ secrets.TURBO_TOKEN }}
TURBO_TEAM: ${{ vars.TURBO_TEAM }}
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version-file: .nvmrc
cache: 'npm'
cache-dependency-path: |
package-lock.json
- name: Install dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Build
run: npm run build
- name: Migrate
run: npm run db:migrate
# Not running test in parallel for readability
- name: Run Test API
run: npm run test:ci
- name: Coverage
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
# Send bundle stats and build information to RelativeCI
- name: Send bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./pkgs/app/dist/webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}