-
Notifications
You must be signed in to change notification settings - Fork 3
60 lines (53 loc) · 1.78 KB
/
build.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
name: Build Codebase
on:
push:
branches: ["*"] # All branches
pull_request:
branches: ["*"] # All branches
env:
JWT_SECRET_KEY: ${{ secrets.JWT_SECRET_KEY }}
DB_TYPE: ${{ secrets.DB_TYPE }}
DB_HOST: ${{ secrets.DB_HOST }}
DB_PORT: ${{ secrets.DB_PORT }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_NAME: ${{ secrets.DB_NAME }}
PEPPER: ${{ secrets.PEPPER }}
TEST_USERID: ${{ secrets.TEST_USERID }}
TEST_EMAIL: ${{ secrets.TEST_EMAIL }}
TEST_PASSWORD: ${{ secrets.TEST_PASSWORD }}
TEST_SALT: ${{ secrets.TEST_SALT }}
DB_TEST_PASSWORD: ${{ secrets.DB_TEST_PASSWORD }}
AUTH_BEARER: ${{ secrets.AUTH_BEARER }}
TEST_DB_NAME: ${{ secrets.TEST_DB_NAME }}
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
AWS_S3_BUCKET_REGION: ${{ secrets.AWS_S3_BUCKET_REGION }}
AWS_S3_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS_KEY_ID }}
AWS_S3_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET_ACCESS_KEY }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 16.x
- name: Build backend
working-directory: backend
run: npm install && npm run build
- name: Build frontend
working-directory: frontend
run: npm install && npm run build
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}