-
Notifications
You must be signed in to change notification settings - Fork 241
72 lines (66 loc) · 1.83 KB
/
ci.yml
File metadata and controls
72 lines (66 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Java CI
on:
schedule:
- cron: '42 0 * * 4'
push:
branches:
- master
pull_request:
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
uses: actions/setup-java@v5
with:
distribution: temurin
java-version: 21
cache: 'maven'
- name: Download compiled artifacts
uses: actions/download-artifact@v7
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 --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