Repository navigation
75 lines (72 loc) · 2.38 KB
/
Copy pathci.yml
File metadata and controls
75 lines (72 loc) · 2.38 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
73
74
75
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
netty_socketio_version:
description: 'Published netty-socketio version to test'
required: true
default: '2.0.14'
permissions:
contents: read
jobs:
build:
name: Boot ${{ matrix.boot }} / JDK ${{ matrix.java }}
runs-on: ubuntu-latest
timeout-minutes: 20
strategy:
fail-fast: false
matrix:
include:
- {boot: '2.3.5.RELEASE', java: '8'}
- {boot: '2.6.0', java: '8'}
- {boot: '2.7.18', java: '8'}
- {boot: '2.7.18', java: '17'}
- {boot: '2.7.18', java: '21'}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: ${{ matrix.java }}
cache: maven
- name: Select Spring Boot compatibility baseline
env:
BOOT_VERSION: ${{ matrix.boot }}
run: |
python3 - <<'PY'
import os
from pathlib import Path
import re
pom = Path('src/it/consumer/pom.xml')
source = pom.read_text()
source, count = re.subn(r'(<parent>.*?<version>).*?(</version>)',
lambda match: match.group(1) + os.environ['BOOT_VERSION'] + match.group(2),
source, count=1, flags=re.S)
assert count == 1
pom.write_text(source)
PY
- name: Install starter artifact
env:
SOCKETIO_VERSION: ${{ inputs.netty_socketio_version || '2.0.14' }}
run: >-
mvn -B --no-transfer-progress clean install -DskipTests
-Dnetty-socketio.version="$SOCKETIO_VERSION"
- name: Test consuming application with Testcontainers Redis
env:
SOCKETIO_VERSION: ${{ inputs.netty_socketio_version || '2.0.14' }}
run: >-
mvn -B --no-transfer-progress -f src/it/consumer/pom.xml clean verify
-Dnetty-socketio.version="$SOCKETIO_VERSION"
- name: Upload test and child-process reports
if: always()
uses: actions/upload-artifact@v4
with:
name: reports-boot${{ matrix.boot }}-jdk${{ matrix.java }}
path: |
src/it/consumer/target/surefire-reports
src/it/consumer/target/test-process-logs
retention-days: 14