Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create main.yml for Github actions #1

Merged
merged 10 commits into from
Oct 2, 2023
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
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() {
// }

}
Loading