-
Notifications
You must be signed in to change notification settings - Fork 4
79 lines (65 loc) · 2.12 KB
/
Copy pathcontinuous-intergration.yml
File metadata and controls
79 lines (65 loc) · 2.12 KB
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
name: continuous integration
on:
pull_request:
branches:
- "main"
- "dev"
permissions:
checks: write
contents: write
pages: write
deployments: write
pull-requests: write
jobs:
check-application:
runs-on: ubuntu-22.04
env:
DOCKER_HOST: "unix:///var/run/docker.sock"
DOCKER_API_VERSION: "1.44"
TESTCONTAINERS_CHECKS_DISABLE: "true"
steps:
- uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "corretto"
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Check Docker Environment
run: |
docker version
docker info
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3
with:
cache-read-only: ${{ github.ref != 'refs/heads/main' && github.ref != 'refs/heads/dev' }}
- name: Build with Gradle
run: ./gradlew build -x test --no-daemon
- name: Test with Gradle
run: >
./gradlew test jacocoTestReport jacocoTestCoverageVerification
--no-daemon --stacktrace
-Ddocker.api.version=1.44
-Dorg.testcontainers.docker.client.strategy=org.testcontainers.dockerclient.UnixSocketClientProviderStrategy
- name: Report Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: build/test-results/**/*.xml
- name: Upload Jacoco Report
id: jacoco
uses: madrapps/jacoco-report@v1.7.2
if: always()
with:
title: "📊테스트 커버리지"
paths: ${{ github.workspace }}/build/reports/jacoco/test/jacocoTestReport.xml
token: ${{ secrets.GITHUB_TOKEN }}
min-coverage-overall: 70
min-coverage-changed-files: 70
update-comment: true
- name: Get the Coverage info
if: always()
run: |
echo "Total coverage ${{ steps.jacoco.outputs.coverage-overall }}"
echo "Changed Files coverage ${{ steps.jacoco.outputs.coverage-changed-files }}"