This repository was archived by the owner on Aug 15, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 15
79 lines (63 loc) · 1.74 KB
/
tk_pull_request.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
name: TkTrEx - Pull Request
on:
push:
branches:
- daily
pull_request:
branches:
- daily
- beta
- feat/**
- fix/**
- refactor/**
paths:
- "packages/**"
- "platforms/tktrex/**"
env:
TK_IMAGE_NAME: tk-backend
jobs:
pull_request:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
mongodb-version: ['4.2']
services:
mongo-db:
image: mongo:4.2
ports:
- 27017:27017
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
cache-dependency-path: yarn.lock
- name: Install modules
run: yarn
- name: Lint code
run: |
yarn tk:backend lint
yarn tk:ext lint
- name: Build shared
run: yarn shared build
- name: Build Backend
run: yarn tk:backend build
- name: Build
run: yarn tk:ext build
- name: Spec tests
run: yarn tk:ext test --runInBand --ci
- name: Test platform
run: |
yarn pm2 start platforms/tktrex/backend/ecosystem.config.js --env test
yarn tk:backend test --runInBand --ci --forceExit
yarn pm2 stop all
- name: Log in to registry
# This is where you will update the personal access token to GITHUB_TOKEN
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $ --password-stdin
- name: Build TK Backend image
run: docker build . --file Dockerfile.tkbackend --tag $TK_IMAGE_NAME --label "runnumber=${GITHUB_RUN_ID}"