Skip to content

Commit

Permalink
Merge pull request #141 from wonderbird/cleanup-and-test
Browse files Browse the repository at this point in the history
Update dependencies and build actions; remove obsolete ai-plugin endpoint
  • Loading branch information
wonderbird authored Mar 28, 2024
2 parents 62e544d + 9369219 commit 09fac6f
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 50 deletions.
41 changes: 21 additions & 20 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
# Adopted from
#
# - https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
# -

name: Build and Publish

Expand All @@ -20,28 +19,29 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Build and Test with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: clean build test cucumber jacocoTestReport
run: ./gradlew clean build test cucumber jacocoTestReport

- name: Attach JAR as Build Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: train-delays-0.0.1-SNAPSHOT.jar
path: build/libs/train-delays-0.0.1-SNAPSHOT.jar

- name: Attach Test Results as Build Artifacts
if: always()
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
Expand All @@ -61,29 +61,30 @@ jobs:
needs: build-and-test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

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

- name: Download Test Results
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: test-results
path: build/reports

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Report Coverage to Coveralls
uses: gradle/gradle-build-action@0d13054264b0bb894ded474f08ebb30921341cee
run: ./gradlew coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
with:
arguments: coveralls

- name: Report Coverage to CodeClimate
uses: paambaati/codeclimate-action@v3.0.0
uses: paambaati/codeclimate-action@v5.0.0
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
JACOCO_SOURCE_PATH: "src/main/java"
Expand All @@ -104,29 +105,29 @@ jobs:
needs: build-and-test

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Download JAR
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: train-delays-0.0.1-SNAPSHOT.jar
path: build/libs

- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
uses: docker/metadata-action@v5
with:
images: boos/train-delays
tags: type=raw,value=latest,enable=${{ endsWith(github.ref, github.event.repository.default_branch) }}

- name: Build and push Docker image
uses: docker/build-push-action@ad44023a93711e3deb337508980b4b5e9bcdc5dc
uses: docker/build-push-action@v5
with:
context: .
push: true
Expand Down
26 changes: 13 additions & 13 deletions build.gradle
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
plugins {
id 'org.springframework.boot' version '3.2.3'
id 'org.springframework.boot' version '3.2.4'
id 'io.spring.dependency-management' version '1.1.4'
id 'java'
id 'jacoco'
id 'com.github.kt3k.coveralls' version '2.12.0'
id 'com.github.kt3k.coveralls' version '2.12.2'
}

group = 'systems.boos'
Expand All @@ -23,32 +23,32 @@ dependencies {
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf'

// Generate OpenAPI documentation from Javadoc, see https://springdoc.org/#javadoc-support
annotationProcessor 'com.github.therapi:therapi-runtime-javadoc-scribe:0.13.0'
implementation 'com.github.therapi:therapi-runtime-javadoc:0.13.0'
annotationProcessor 'com.github.therapi:therapi-runtime-javadoc-scribe:0.15.0'
implementation 'com.github.therapi:therapi-runtime-javadoc:0.15.0'
implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.4.0'

// adding the Jackson reference automatically allows processing application/xml response bodies
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.13.4'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2'
implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml:2.14.3'
implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.3'

developmentOnly 'org.springframework.boot:spring-boot-devtools'

testImplementation('org.springframework.boot:spring-boot-starter-test') {
exclude group: "com.vaadin.external.google", module: "android-json"
}
testImplementation 'net.sourceforge.htmlunit:htmlunit:2.67.0'
testImplementation 'net.sourceforge.htmlunit:htmlunit:2.70.0'

testImplementation 'au.com.dius.pact.consumer:java8:4.1.42'
testImplementation 'au.com.dius.pact.consumer:junit5:4.6.7'
testImplementation 'au.com.dius.pact.provider:junit5spring:4.6.7'

testImplementation 'org.json:json:20220924'
testImplementation 'org.json:json:20240303'
testImplementation 'org.apache.commons:commons-collections4:4.4'
testImplementation 'io.cucumber:cucumber-spring:7.10.1'
testImplementation 'io.cucumber:cucumber-java:7.10.1'
testImplementation 'io.cucumber:cucumber-junit:7.10.1'
testImplementation 'org.mock-server:mockserver-netty:5.14.0'
testImplementation 'org.mockito:mockito-inline:5.1.1'
testImplementation 'io.cucumber:cucumber-spring:7.16.1'
testImplementation 'io.cucumber:cucumber-java:7.16.1'
testImplementation 'io.cucumber:cucumber-junit:7.16.1'
testImplementation 'org.mock-server:mockserver-netty:5.15.0'
testImplementation 'org.mockito:mockito-inline:5.2.0'
}

configurations {
Expand Down
17 changes: 0 additions & 17 deletions src/main/resources/static/.well-known/ai-plugin.json

This file was deleted.

0 comments on commit 09fac6f

Please sign in to comment.