Skip to content

Commit

Permalink
Merge pull request #1 from This-Is-Ko/github-actions
Browse files Browse the repository at this point in the history
Create main.yml for Github actions
  • Loading branch information
This-Is-Ko authored Oct 2, 2023
2 parents cc39cb8 + 0418a45 commit 452b120
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 4 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Java

on:
push:
workflow_dispatch:

jobs:
build:

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v1

- name: Set up JDK 20
uses: actions/setup-java@v2
with:
java-version: '20'
distribution: 'adopt'

- name: Grant Permissions to gradlew
run: chmod +x gradlew

- name: Build
run: ./gradlew build -x test

- name: Test
run: ./gradlew test --continue

- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: |
build/test-results/**/*.xml
action_fail: 'true'

- name: Upload test report
uses: actions/upload-artifact@v2
with:
name: test-case reports
path: build/test-results
6 changes: 5 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ plugins {
}

group = 'com.ko'
version = '0.0.1-SNAPSHOT'
version = '0.0.2-SNAPSHOT'

java {
sourceCompatibility = '20'
Expand Down Expand Up @@ -49,4 +49,8 @@ bootJar {
attributes 'Start-Class': "com.ko.footballupdater.FootballUpdaterApplication"
attributes 'Main-Class': "org.springframework.boot.loader.JarLauncher"
}
}

test {
useJUnitPlatform()
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
@SpringBootTest
class FootballupdaterApplicationTests {

@Test
void contextLoads() {
}
// @Test
// void contextLoads() {
// }

}

0 comments on commit 452b120

Please sign in to comment.