Skip to content

Commit

Permalink
🚚 Chore : ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™” (#18)
Browse files Browse the repository at this point in the history
* ✨ Feat : `.gitmessage`

- import from `spring-templates/java-lotto`
- λ°±μ—”λ“œ 개발 κ°„ 자주 μ‚¬μš©λ  κ²ƒμœΌλ‘œ μ˜ˆμƒλ˜λŠ” λ‚΄μš©μœΌλ‘œ μˆ˜μ •

* 🚚 Chore : Spring ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™”

- Java/Spring Boot
- BellSoft Liberica JDK 17
- Spring Web
- [spring initializr](https://start.spring.io/#!type=gradle-project-kotlin&language=java&platformVersion=3.2.4&packaging=jar&jvmVersion=17&groupId=com.concurrency&artifactId=thread&name=spring-concurrency-thread&description=Examples%20of%20Java%20Thread%20Concurrency%20in%20Spring%20Framework&packageName=com.concurrency.thread&dependencies=web)

* πŸ› Fix : κ²½κ³  μ–΅μ œλ₯Ό μœ„ν•œ λΉŒλ“œ μ„€μ •

- gradle deprecated usage
- jvm CDS

* ✨ Feat : Build Optimizing

- enable build caching
- enable CDS while execution

* 🚚 Chore : GitHub Actions 톡합 ν…ŒμŠ€νŠΈ

* πŸ› Fix : μœ νš¨ν•˜μ§€ μ•Šμ€ μΊμ‹œν‚€ 이슈

- `.gradle/caches`에 μ˜μ‘΄μ„± λ‚˜μ—΄

* πŸ› Fix : remove redundancy

- GitHub Actions의 자체 캐싱 ν™œμš©

* ✨ Feat : test μ •μ±… λ³€κ²½

- `main` 브랜치만 clean test μˆ˜ν–‰

* πŸ› Fix : 캐싱 κΈ°λŠ₯

* πŸ› Fix : `main` 이외 브랜치 캐싱

* πŸ“ Docs : PR template

* πŸ› Fix : `.gitmessage` format μΆ”κ°€

* 🎨 Style : polishing

* 🚚 Chore : simplify dependency

* ✨ Feat : JDK 21 with Jacoco (#15)

* 🚚 Chore : ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™” (#9)

* ✨ Feat : `.gitmessage`

- import from `spring-templates/java-lotto`
- λ°±μ—”λ“œ 개발 κ°„ 자주 μ‚¬μš©λ  κ²ƒμœΌλ‘œ μ˜ˆμƒλ˜λŠ” λ‚΄μš©μœΌλ‘œ μˆ˜μ •

* 🚚 Chore : Spring ν”„λ‘œμ νŠΈ μ΄ˆκΈ°ν™”

- Java/Spring Boot
- BellSoft Liberica JDK 17
- Spring Web
- [spring initializr](https://start.spring.io/#!type=gradle-project-kotlin&language=java&platformVersion=3.2.4&packaging=jar&jvmVersion=17&groupId=com.concurrency&artifactId=thread&name=spring-concurrency-thread&description=Examples%20of%20Java%20Thread%20Concurrency%20in%20Spring%20Framework&packageName=com.concurrency.thread&dependencies=web)

* πŸ› Fix : κ²½κ³  μ–΅μ œλ₯Ό μœ„ν•œ λΉŒλ“œ μ„€μ •

- gradle deprecated usage
- jvm CDS

* ✨ Feat : Build Optimizing

- enable build caching
- enable CDS while execution

* 🚚 Chore : GitHub Actions 톡합 ν…ŒμŠ€νŠΈ

* πŸ› Fix : μœ νš¨ν•˜μ§€ μ•Šμ€ μΊμ‹œν‚€ 이슈

- `.gradle/caches`에 μ˜μ‘΄μ„± λ‚˜μ—΄

* πŸ› Fix : remove redundancy

- GitHub Actions의 자체 캐싱 ν™œμš©

* ✨ Feat : test μ •μ±… λ³€κ²½

- `main` 브랜치만 clean test μˆ˜ν–‰

* πŸ› Fix : 캐싱 κΈ°λŠ₯

* πŸ› Fix : `main` 이외 브랜치 캐싱

* πŸ“ Docs : PR template

* πŸ› Fix : `.gitmessage` format μΆ”κ°€

* 🎨 Style : polishing

* 🚚 Chore : simplify dependency

* ✨ Feat : JDK 21 with Jacoco

* πŸ”§ Modify : codecov-action ν…ŒμŠ€νŠΈ

[codecov-action](https://github.com/codecov/codecov-action)
  • Loading branch information
ooMia authored Mar 27, 2024
1 parent d72767f commit 423c09a
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 12 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/gradle-test-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,18 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
java-version: '21'

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

- name: Run gradlew clean test on main
run: ./gradlew clean test
run: ./gradlew clean test --warning-mode=all

- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: spring-templates/spring-concurrency-thread
fail_ci_if_error: true
verbose: true
13 changes: 11 additions & 2 deletions .github/workflows/gradle-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/setup-java@v4
with:
distribution: 'liberica'
java-version: '17'
java-version: '21'

- name: Cache Gradle packages
uses: actions/cache@v4
Expand All @@ -29,4 +29,13 @@ jobs:
run: chmod +x gradlew

- name: Run gradlew test
run: ./gradlew test
run: ./gradlew test --warning-mode=all

- name: Upload test coverage to Codecov.io
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: spring-templates/spring-concurrency-thread
fail_ci_if_error: true
verbose: true
flags: unittests
30 changes: 23 additions & 7 deletions build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
plugins {
java
jacoco
id("org.springframework.boot") version "3.2.4"
id("io.spring.dependency-management") version "1.1.4"
}
Expand All @@ -8,7 +9,7 @@ group = "com.thread"
version = "0.1.0-SNAPSHOT"

java {
sourceCompatibility = JavaVersion.VERSION_17
sourceCompatibility = JavaVersion.VERSION_21
}

repositories {
Expand All @@ -18,18 +19,33 @@ repositories {
dependencies {
implementation("org.springframework.boot:spring-boot-starter")
testImplementation("org.springframework.boot:spring-boot-starter-test")
testImplementation("org.junit.jupiter:junit-jupiter:5.8.2")
testRuntimeOnly("org.junit.platform:junit-platform-launcher")
testRuntimeOnly("org.reactivestreams:reactive-streams")
testRuntimeOnly("org.apache.logging.log4j:log4j-core")
}

tasks.all {
outputs.cacheIf { true }
}

tasks {
all {
outputs.cacheIf { true }
test {
jvmArgs("-Xshare:off", "-XX:+EnableDynamicAgentLoading")
useJUnitPlatform()
finalizedBy(jacocoTestReport)
}
jacocoTestReport {
dependsOn(test)
reports {
xml.required = true
csv.required = false
html.required = false
}
}
}

tasks.test {
jvmArgs("-Xshare:off")
useJUnitPlatform()
tasks.withType<Test>().configureEach {
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).coerceAtLeast(1)
}

apply(from = "dumpJsa.gradle.kts")
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
networkTimeout=10000
validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import static org.junit.jupiter.api.Assertions.assertDoesNotThrow;

@SpringBootTest
class SpringThreadConcurrencyApplicationTests {

@Test
void contextLoads() {
assertDoesNotThrow(() -> SpringThreadConcurrencyApplication.main(new String[]{}));
}

}

0 comments on commit 423c09a

Please sign in to comment.