-
Notifications
You must be signed in to change notification settings - Fork 185
86 lines (69 loc) · 3.04 KB
/
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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
name: Test
on:
pull_request:
branches:
- main
jobs:
test:
runs-on: ubuntu-latest
environment: baibay
strategy:
matrix:
node-version: ['18.x']
steps:
- name: Git checkout
uses: actions/checkout@v3
- name: Setup node version ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Create env file
run: |
touch .env
echo APP_NAME="ack" >> .env
echo APP_ENV="development" >> .env
echo APP_LANGUAGE="en" >> .env
echo HTTP_ENABLE="true" >> .env
echo HTTP_HOST="localhost" >> .env
echo HTTP_PORT="3000" >> .env
echo HTTP_VERSIONING_ENABLE="true" >> .env
echo HTTP_VERSION="1" >> .env
echo DEBUGGER_HTTP_WRITE_INTO_FILE="false" >> .env
echo DEBUGGER_HTTP_WRITE_INTO_CONSOLE="false" >> .env
echo DEBUGGER_SYSTEM_WRITE_INTO_FILE="false" >> .env
echo DEBUGGER_SYSTEM_WRITE_INTO_CONSOLE="false" >> .env
echo JOB_ENABLE="true" >> .env
echo DATABASE_HOST="mongodb://localhost:27017" >> .env
echo DATABASE_NAME="ack" >> .env
echo DATABASE_USER="" >> .env
echo DATABASE_PASSWORD="" >> .env
echo DATABASE_DEBUG="false" >> .env
echo DATABASE_OPTIONS="replicaSet=test-rs" >> .env
echo AUTH_JWT_SUBJECT="AckDevelopment" >> .env
echo AUTH_JWT_AUDIENCE="https://example.com" >> .env
echo AUTH_JWT_ISSUER="ack" >> .env
echo AUTH_JWT_ACCESS_TOKEN_SECRET_KEY="85huyujDurLdvLsjAW93XsqP79rAotqplHCOEWj1wzyIcMtT" >> .env
echo AUTH_JWT_ACCESS_TOKEN_EXPIRED="15m" >> .env
echo AUTH_JWT_REFRESH_TOKEN_SECRET_KEY="7Y3nqaO8jKVOFBRy9ujn5uUxV8Iy2otHrnQgiXlIGAqiVdb5" >> .env
echo AUTH_JWT_REFRESH_TOKEN_EXPIRED="7d" >> .env
echo AUTH_JWT_REFRESH_TOKEN_NOT_BEFORE_EXPIRATION="15m" >> .env
echo AUTH_JWT_PAYLOAD_ENCRYPT="false" >> .env
echo AUTH_JWT_PAYLOAD_ACCESS_TOKEN_ENCRYPT_KEY="fKyRq7g9eftVNEdiCC7lNU6fga5Pr1iC7dc0JYsC" >> .env
echo AUTH_JWT_PAYLOAD_ACCESS_TOKEN_ENCRYPT_IV="mLZZdQrXqjPW5F5H2eko" >> .env
echo AUTH_JWT_PAYLOAD_REFRESH_TOKEN_ENCRYPT_KEY="NnCnSrRmw5YuQyTPtDokOWmKR37EYbuB6ITZqqZd" >> .env
echo AUTH_JWT_PAYLOAD_REFRESH_TOKEN_ENCRYPT_IV="eP7P8Pmvq207zhyd61dz" >> .env
echo AWS_CREDENTIAL_KEY="$AWS_CREDENTIAL_KEY" >> .env
echo AWS_CREDENTIAL_SECRET="$AWS_CREDENTIAL_SECRET" >> .env
echo AWS_S3_BUCKET="$AWS_S3_BUCKET" >> .env
echo AWS_S3_REGION="$AWS_S3_REGION" >> .env
env:
AWS_CREDENTIAL_KEY: ${{ secrets.AWS_CREDENTIAL_KEY }}
AWS_CREDENTIAL_SECRET: ${{ secrets.AWS_CREDENTIAL_SECRET }}
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
AWS_S3_REGION: ${{ secrets.AWS_S3_REGION }}
- name: Unit Test
run: yarn test
env:
CI: true