Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Spring CI for Pull Request

on:
pull_request:
branches: [ main, dev ]
types: [opened, synchronize, reopened]
branches: [ dev, main ]
types: [ opened, synchronize, reopened ]

permissions:
contents: write
Expand Down Expand Up @@ -45,10 +45,10 @@ jobs:
- name: Upload JaCoCo report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }} # public repo라면 생략 가능
token: ${{ secrets.CODECOV_TOKEN }}
files: build/reports/jacoco/test/jacocoTestReport.xml
fail_ci_if_error: true
flags: unittests
flags: pr
verbose: true

- name: Extract JaCoCo Coverage Percentage
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/push-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Upload Coverage on Push

on:
push:
branches: [ dev, main ]

permissions:
contents: read

jobs:
upload-coverage:
name: Upload Coverage to Codecov
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'

- name: Grant execute permission for gradlew
run: chmod +x ./gradlew

- name: Run Tests and Generate Coverage
run: ./gradlew clean test jacocoTestReport --no-daemon

- name: Upload JaCoCo report to Codecov
uses: codecov/codecov-action@v4
with:
files: build/reports/jacoco/test/jacocoTestReport.xml
fail_ci_if_error: true
flags: dev
verbose: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,8 @@ spy.log

### Spring Boot ###
application.yml

### node ###
node_modules/
package-lock.json
package.json