-
Notifications
You must be signed in to change notification settings - Fork 68
86 lines (73 loc) · 3.06 KB
/
Copy pathpull_requests.yml
File metadata and controls
86 lines (73 loc) · 3.06 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
76
77
78
79
80
81
82
83
84
85
86
name: Test
on:
push:
branches:
- main
- development
- 16.0.x
pull_request:
branches:
- main
- development
- 16.0.x
jobs:
test:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v7
- name: Setup Java
uses: actions/setup-java@v5
with:
java-version: '17'
distribution: 'temurin'
cache: maven
- if: github.base_ref == 'main' || github.ref_name == 'main'
name: Start Infinispan Server Latest Stable Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:16.2
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
- if: github.base_ref == 'development' || github.ref_name == 'development'
name: Start Infinispan Server Latest Dev Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan-test/server:main
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
- if: github.base_ref == '16.0.x' || github.ref_name == '16.0.x'
name: Start Infinispan Server Latest Version
run: |
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" quay.io/infinispan/server:16.0
# Wait for server to startup
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/cache-managers/default/health/status > /dev/null
- name: JDK 17 Tests
run: ./mvnw -B clean install -Dmaven.test.failure.ignore=true
- name: Restart Infinispan Server for Node.js Tests
run: |
IMAGE=$(docker inspect --format='{{.Config.Image}}' $(docker ps -q | head -1) 2>/dev/null || true)
docker stop $(docker ps -q) 2>/dev/null || true
docker rm $(docker ps -aq) 2>/dev/null || true
if [ -n "$IMAGE" ]; then
docker run -d -p 11222:11222 -e USER="admin" -e PASS="password" "$IMAGE"
curl --fail --silent --show-error --retry-all-errors --retry 240 --retry-delay 1 http://localhost:11222/rest/v2/container/health/status > /dev/null
fi
- name: Setup Node.js
uses: actions/setup-node@v6
with:
node-version: '22'
- name: Node.js Client Tests
working-directory: non-java-clients/node.js
run: |
npm install
npm test
- name: Test Logs
uses: actions/upload-artifact@v7
if: success() || failure()
with:
name: jdk17-test-results
path: "**/target/*-reports*/**/TEST-*.xml"
- name: Get thread dump on failure
if: failure()
run: docker kill $(docker ps -q) -s 3
- name: Dump docker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2