Skip to content

Commit

Permalink
Add integration test (#31)
Browse files Browse the repository at this point in the history
  • Loading branch information
komamitsu authored Dec 27, 2024
1 parent aeb20eb commit 80e0265
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 13 deletions.
34 changes: 29 additions & 5 deletions .github/workflows/kelpie.yaml
Original file line number Diff line number Diff line change
@@ -1,26 +1,50 @@
name: Kelpie

on: [push, pull_request]
on: [push, pull_request, workflow_dispatch]

jobs:
build:
runs-on: ubuntu-latest
name: Build
strategy:
matrix:
java_version: [8, 11, 17, 21]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Cache repository
uses: actions/cache@v1
uses: actions/cache@v4
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Setup Java
uses: actions/setup-java@v1
uses: actions/setup-java@v4
with:
java-version: 1.8
java-version: ${{ matrix.java_version }}
distribution: 'temurin'

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

- name: Build Kelpie
run: ./gradlew build

- name: Install distribution of Kelpie
run: ./gradlew installDist

- name: Checkout Kelpie-Test
uses: actions/checkout@v4
with:
repository: scalar-labs/kelpie-test
path: kelpie-test

- name: Build Kelpie-Test:print-modules
working-directory: kelpie-test/print-modules
run: gradle shadowJar

- name: Execute Kelpie-Test:print-modules
working-directory: kelpie-test
run: ${{ github.workspace }}/build/install/kelpie/bin/kelpie --config print-modules/config.toml
10 changes: 3 additions & 7 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,11 @@ dependencies {
testImplementation group: 'org.mockito', name: 'mockito-core', version: '3.2.4'
}

task sourcesJar(type: Jar) {
classifier = 'sources'
from sourceSets.main.allSource
java {
withJavadocJar()
withSourcesJar()
}

task javadocJar(type: Jar) {
classifier = 'javadoc'
from javadoc
}

sourceCompatibility = 1.8
targetCompatibility = 1.8
Expand Down
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.11.1-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists

0 comments on commit 80e0265

Please sign in to comment.