-
Notifications
You must be signed in to change notification settings - Fork 0
90 lines (80 loc) · 3.14 KB
/
develop-ci.yaml
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
86
87
88
89
90
name: Develop - CI
on:
push:
branches: [ "develop" ]
paths-ignore:
- 'docs/**'
- 'README.md'
pull_request:
branches: [ "develop" ]
paths-ignore:
- 'docs/**'
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up JDK
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '11'
- name: Grant Execute Permission for Gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build
env:
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
FIREBASE_CLIENT_CERT_URL: ${{ secrets.FIREBASE_CLIENT_CERT_URL }}
FIREBASE_CLIENT_EMAIL: ${{ secrets.FIREBASE_CLIENT_EMAIL }}
FIREBASE_CLIENT_ID: ${{ secrets.FIREBASE_CLIENT_ID }}
FIREBASE_PRIVATE_KEY: ${{ secrets.FIREBASE_PRIVATE_KEY }}
FIREBASE_PRIVATE_KEY_ID: ${{ secrets.FIREBASE_PRIVATE_KEY_ID }}
FIREBASE_PROJECT_ID: ${{ secrets.FIREBASE_PROJECT_ID }}
JWT_DOMAIN: ${{ secrets.JWT_DOMAIN }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_TIME_ACCESS: ${{ secrets.JWT_TIME_ACCESS }}
JWT_TIME_REFRESH: ${{ secrets.JWT_TIME_REFRESH }}
MAIL_ADDRESS: ${{ secrets.MAIL_ADDRESS }}
MAIL_HOST: ${{ secrets.MAIL_HOST }}
MAIL_PASSWORD: ${{ secrets.MAIL_PASSWORD }}
MAIL_PORT: ${{ secrets.MAIL_PORT }}
MAIL_USERNAME: ${{ secrets.MAIL_USERNAME }}
MAX_FILE_SIZE: ${{ secrets.MAX_FILE_SIZE }}
MAX_REQUEST_SIZE: ${{ secrets.MAX_REQUEST_SIZE }}
S3_ACCESS_KEY: ${{ secrets.S3_ACCESS_KEY }}
S3_PORTFOLIO_FILE_BUCKET: ${{ secrets.S3_PORTFOLIO_FILE_BUCKET }}
S3_PROFILE_IMG_BUCKET: ${{ secrets.S3_PROFILE_IMG_BUCKET }}
S3_REGION: ${{ secrets.S3_REGION }}
S3_SECRET_KEY: ${{ secrets.S3_SECRET_KEY }}
SWAGGER_BASE_URL: ${{ secrets.SWAGGER_BASE_URL }}
- name: JaCoCo Code Coverage Report
id: jacoco_reporter
uses: PavanMudigonda/jacoco-reporter@v4.8
with:
coverage_results_path: build/reports/jacoco/test/jacocoTestReport.xml
coverage_report_name: Coverage
coverage_report_title: JaCoCo
github_token: ${{ secrets.GITHUB_TOKEN }}
skip_check_run: false
minimum_coverage: 90
fail_below_threshold: true
publish_only_summary: true
- name: Add Coverage Job Summary
run: echo "${{ steps.jacoco_reporter.outputs.coverageSummary }}" >> $GITHUB_STEP_SUMMARY
- name: Upload Code Coverage Artifacts
uses: actions/upload-artifact@v2
with:
name: code-coverage-report-html
path: build/reports/jacoco/test/html
retention-days: 90
- name: Build and Push Docker image
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: gs97ahn/server
tags: gabojait-alpha-latest
registry: docker.io
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}