-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (57 loc) · 1.68 KB
/
pr-check.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
name: PR check
on:
pull_request:
branches:
- main
- story-new-conductor-api
- story-new-graphql-proxy
jobs:
pr-check:
runs-on: ubuntu-latest
container: node:18-slim
services:
postgres:
image: postgres:14-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout repository code
uses: actions/checkout@v3
- name: Install apt deps
run: apt-get update && apt-get install -y openssl
- name: Install dependencies
run: npm ci
- name: Generate prisma client
run: npm run prisma:generate
- name: Test the code
run: npm test
env:
DATABASE_URL: postgresql://postgres:postgres@postgres:5432/frinx
HOST: localhost
PORT: 8001
UNICONFIG_API_PROTOCOL: http
UNICONFIG_API_PORT: 4000
UNICONFIG_LIST_URL: http://localhost:4000/static/list/uniconfig
X_TENANT_ID: frinx
TOPOLOGY_ENABLED: false
SHELL_HOST: 10.19.0.12
CONDUCTOR_API_URL: 10.19.0.7
SCHEDULER_API_URL: 10.19.0.7
RESOURCE_MANAGER_API_URL: 10.19.0.7
KAFKA_BROKER: 10.19.0.25:30006
KAFKA_TOPIC: uniconfig
KAFKA_ENABLED: false
PERFORMANCE_MONITORING_ENABLED: true
- name: Check code formatting
run: npm run formatter:check
- name: Run eslint check
run: npm run lint
- name: Run TS typecheck
run: npm run type-check