-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 2.36 KB
/
Copy pathci.yml
File metadata and controls
78 lines (65 loc) · 2.36 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
name: ci
# The harness's own self-test. Unlike the reusable interop.yml (which repoints the path repo at a
# consumer PR), this builds the harness against its declared path repos to the sibling middleware repos,
# so a change to the harness itself is exercised end-to-end on every push / PR.
on:
push:
pull_request:
jobs:
self-test:
runs-on: ubuntu-latest
steps:
- name: Checkout harness
uses: actions/checkout@v4
# The sibling middlewares the harness's composer.json path repos point at (../<name>).
- name: Checkout http-wsse-middleware
uses: actions/checkout@v4
with:
repository: php-soap/http-wsse-middleware
path: ../http-wsse-middleware
- name: Checkout psr18-attachments-middleware
uses: actions/checkout@v4
with:
repository: php-soap/psr18-attachments-middleware
path: ../psr18-attachments-middleware
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: dom, openssl, intl, gmp, bcmath
coverage: none
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- name: Cache Maven repository
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('oracle/pom.xml') }}
restore-keys: ${{ runner.os }}-m2-
- name: Build oracle jar
run: mvn -B -f oracle/pom.xml -DskipTests package
- name: Build oracle image
run: docker build -t java-interop-oracle .
- name: Generate certs
run: bash certs/generate.sh
- name: Start oracle
run: |
docker run -d --name oracle -p 8080:8080 \
-v "$PWD/certs:/certs" java-interop-oracle
for i in $(seq 1 30); do
if curl -fsS http://127.0.0.1:8080/health >/dev/null 2>&1; then
echo "oracle healthy"; exit 0
fi
sleep 1
done
echo "oracle failed to become healthy"; docker logs oracle; exit 1
- name: Install dependencies
run: composer install --no-interaction --no-progress
- name: Run interop tests
run: vendor/bin/phpunit
- name: Oracle logs (on failure)
if: failure()
run: docker logs oracle || true