Skip to content

WIP: V4

WIP: V4 #349

Workflow file for this run

name: Tests
on:
workflow_dispatch:
push:
branches:
- main
paths:
- '.github/workflows/tests.yaml'
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpunit/**.xml'
- 'phpunit.xml'
pull_request:
branches:
- main
paths:
- '.github/workflows/tests.yaml'
- '**.php'
- 'composer.json'
- 'composer.lock'
- 'phpunit/**.xml'
- 'phpunit.xml'
jobs:
builder-tests:
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
name: 'Builder Tests - PHP ${{ matrix.php-version }}'
steps:
- uses: actions/checkout@v4
- name: 'Bootstrap'
uses: ./.github/actions/bootstrap
with:
php-version: ${{ matrix.php-version }}
- name: 'Run tests'
# language=sh
run: ./vendor/bin/phpunit -c 'phpunit/Builder.xml'
load-fhir-source:
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
test-target:
- 'DSTU1'
- 'DSTU2'
- 'STU3'
- 'R4'
- 'R4B'
- 'R5'
name: 'Download ${{ matrix.test-target }} Source'
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/load-fhir-xsd
with:
version: '${{ matrix.test-target }}'
run:
runs-on: ubuntu-22.04
needs:
- load-fhir-source
strategy:
fail-fast: false
matrix:
php-version:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
test-target:
- 'Core'
- 'DSTU1'
- 'DSTU2'
- 'STU3'
- 'R4'
- 'R4B'
- 'R5'
name: '${{ matrix.test-target }} - PHP ${{ matrix.php-version }} - PHPUnit ${{ matrix.phpunit-version }}'
services:
php-fhir-test-server:
image: dancarbone/php-fhir-test-server:latest
ports:
- '8080:8080'
steps:
- uses: actions/checkout@v4
- name: 'Bootstrap'
uses: ./.github/actions/bootstrap
with:
php-version: ${{ matrix.php-version }}
- name: 'Load FHIR ${{ matrix.test-target }} Source'
id: fhir-source
if: matrix.test-target != 'Core'
uses: ./.github/actions/load-fhir-xsd
with:
version: '${{ matrix.test-target }}'
- name: 'Run tests'
# language=sh
run: |
./vendor/bin/phpunit -c 'phpunit/${{ matrix.test-target }}.xml'