Add LICENSE and a help-out section; note this is a test harness, not … #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |