-
Notifications
You must be signed in to change notification settings - Fork 2
41 lines (37 loc) · 1.71 KB
/
exec-mocha-unit-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
name: Execute Mocha Unit Test
on:
pull_request:
branches: [dev, main, production-1, production-2]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
- run: sh ./script/setup-global.sh
- run: bash ./script/prebuild.sh
- name: run unit test code
run: npm run test-unit
env:
NODE_ENV: test
MYSQL_TST_USERNAME: '${{ secrets.MYSQL_TST_USERNAME }}'
MYSQL_TST_PASSWORD: '${{ secrets.MYSQL_TST_PASSWORD }}'
MYSQL_TST_DATABASE: '${{ secrets.MYSQL_TST_DATABASE }}'
MYSQL_TST_HOST: '${{ secrets.MYSQL_TST_HOST }}'
MYSQL_TST_PORT: '${{ secrets.MYSQL_TST_PORT }}'
MYSQL_TST_DIALECT: '${{ secrets.MYSQL_TST_DIALECT }}'
MONGO_URI: '${{ secrets.MONGO_URI }}'
CORS_ALLOW_LIST: '${{ secrets.CORS_ALLOW_LIST }}'
JWT_SECRET: '${{ secrets.JWT_SECRET }}'
ENCRYPTION_KEY: '${{ secrets.ENCRYPTION_KEY }}'
ENCRYPT_ALGORITHM: '${{ secrets.ENCRYPT_ALGORITHM }}'
AWS_S3_URL: '${{ secrets.AWS_S3_URL }}'
AWS_ACCESS_KEY_ID: '${{ secrets.AWS_ACCESS_KEY_ID }}'
AWS_SECRET_ACCESS_KEY: '${{ secrets.AWS_SECRET_ACCESS_KEY }}'
REDIS_HOST: '${{ secrets.REDIS_HOST }}'
REDIS_PORT: '${{ secrets.REDIS_PORT }}'
REDIS_DB_ID: '${{ secrets.REDIS_TEST_DB_ID }}'