Skip to content
Open
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
51 changes: 48 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,11 @@
<quiet>true</quiet>
</sortPom>
</pom>
<yaml>
<includes>
<include>docker-compose.yml</include>
</includes>
</yaml>
<upToDateChecking>
<enabled>true</enabled>
</upToDateChecking>
Expand Down