diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b9e9e93c..0b4402ad 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -10,9 +10,39 @@ on:
jobs:
build:
+ runs-on: ubuntu-latest
+ name: Build w/o tests
+ steps:
+ - uses: actions/checkout@v6
+ - name: Set up JDK 21
+ uses: actions/setup-java@v5
+ with:
+ distribution: temurin
+ java-version: 21
+ cache: 'maven'
+ - name: Build with Maven
+ run: ./mvnw -V -DskipTests --no-transfer-progress package
+ - name: Upload artifacts
+ uses: actions/upload-artifact@v6
+ with:
+ name: maven-build-artifacts
+ path: target/
+ retention-days: 1
+ test:
+ needs: build
runs-on: ubuntu-latest
+ strategy:
+ fail-fast: false
+ matrix:
+ kubo: # https://github.com/ipfs/kubo#docker
+ - v0.39.0 # specific release tag
+ - release # latest stable release
+ - master-latest # developer preview, HEAD of master branch
+
+ name: Test with Kubo tag ${{matrix.kubo}}
+
steps:
- uses: actions/checkout@v6
- name: Set up JDK 21
@@ -21,7 +51,22 @@ jobs:
distribution: temurin
java-version: 21
cache: 'maven'
- - name: Install and run IPFS
- run: ./install-run-ipfs.sh
+ - name: Download compiled artifacts
+ uses: actions/download-artifact@v5
+ with:
+ name: maven-build-artifacts
+ path: target/
+ - name: Set up Docker Compose
+ run: sudo apt-get install docker-compose
+ - name: Run Kubo ${{matrix.kubo}} IPFS daemon
+ env:
+ KUBO_TAG: ${{matrix.kubo}}
+ run: docker compose up -d
- name: Build & run tests with Maven
- run: ./mvnw -V verify
+ run: ./mvnw -V --no-transfer-progress -Dmaven.compiler.skip=true verify
+ - name: Kubo logs
+ if: ${{always()}}
+ run: docker compose logs
+ - name: Shut down Docker Compose
+ if: always()
+ run: docker compose down
diff --git a/docker-compose.yml b/docker-compose.yml
index 36d00764..c89c03ad 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,7 +1,8 @@
-version: '2'
services:
ipfs-daemon:
- image: 'ipfs/kubo:v0.39.0'
+ image: ipfs/kubo:${KUBO_TAG-release} # default is latest release, see https://github.com/ipfs/kubo#docker
+ environment:
+ IPFS_TELEMETRY: off
ports:
- "4001:4001"
- "5001:5001"
diff --git a/pom.xml b/pom.xml
index 87335e6a..77e2265f 100644
--- a/pom.xml
+++ b/pom.xml
@@ -107,6 +107,11 @@
true
+
+
+ docker-compose.yml
+
+
true