Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP: V4 #152

Draft
wants to merge 169 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
169 commits
Select commit Hold shift + click to select a range
89d32d5
creating method crud
dcarbone May 4, 2024
29b1fa8
more client work
dcarbone May 5, 2024
b13cde8
busted thoughts
dcarbone Jun 7, 2024
c668ec3
fuckin' it all up
dcarbone Jul 19, 2024
751bc78
working through some ideas
dcarbone Jul 19, 2024
56eb8e4
fixing composer.json
dcarbone Jul 19, 2024
8ec8325
more little work
dcarbone Jul 20, 2024
db4bf11
more work, need to carefully consider constants
dcarbone Jul 20, 2024
450dba6
merging in main, some small thoughts
dcarbone Aug 31, 2024
2c861be
lots more work done
dcarbone Sep 1, 2024
ab04f62
little bit more work
dcarbone Sep 2, 2024
e78d88c
more little bits of work
dcarbone Sep 2, 2024
605a7c5
little bit more work
dcarbone Sep 9, 2024
e5e760a
little things
dcarbone Sep 9, 2024
fc26220
moving on along
dcarbone Sep 13, 2024
5b56e13
workin' on it
dcarbone Nov 9, 2024
c4c240a
more small steps
dcarbone Nov 9, 2024
69f6bf0
more thoughts
dcarbone Nov 10, 2024
70338f5
little better.
dcarbone Nov 10, 2024
21e0f0e
more little steps
dcarbone Nov 10, 2024
1e964f9
closer.
dcarbone Nov 12, 2024
7a2d523
few more small things
dcarbone Nov 12, 2024
a3ba859
few lil things
dcarbone Nov 17, 2024
37b97d5
do I even need to bother with an autoloader anymore?
dcarbone Nov 17, 2024
4526ab5
eh.
dcarbone Nov 17, 2024
fb9b50d
few more small fixes
dcarbone Nov 20, 2024
7efb8af
Merge remote-tracking branch 'origin/main' into feature/api-client
dcarbone Nov 20, 2024
ba9140b
more small steps
dcarbone Nov 20, 2024
242053f
more bits of work
dcarbone Dec 6, 2024
3563782
bit of cleanup around type maps and contained types
dcarbone Dec 6, 2024
92324c2
lots of work, utterly broken, need to figure out version config chain
dcarbone Dec 9, 2024
83348f0
coming along with the config...
dcarbone Dec 11, 2024
b850dfa
few little fixups
dcarbone Dec 11, 2024
300b7ac
getting close...
dcarbone Dec 11, 2024
fd3fe4c
sloppy filename stuff
dcarbone Dec 11, 2024
183f0a5
Merge branch 'main' into feature/api-client
dcarbone Dec 11, 2024
dfff869
breaking it to remind myself later.
dcarbone Dec 11, 2024
ce31fff
drastically re-worked autoloader system, working on root config updates
dcarbone Dec 12, 2024
0a33ad2
config and init thoughts, needs rethought-ing.
dcarbone Dec 13, 2024
4f72d79
thoughts, but not convinced.
dcarbone Dec 13, 2024
55fcb96
factory probably done?
dcarbone Dec 17, 2024
9d5fd04
getting there.
dcarbone Dec 18, 2024
4734fa0
getting closer.
dcarbone Dec 18, 2024
6987c1a
some test fixes, need to redo core
dcarbone Dec 18, 2024
7ef2267
derp
dcarbone Dec 18, 2024
252a7ab
derp
dcarbone Dec 18, 2024
e9279f6
small fixes
dcarbone Dec 18, 2024
4670bd1
little bit of cleanup, handling dstu1 Binary type
dcarbone Dec 18, 2024
f4e14e8
some test fixes
dcarbone Dec 18, 2024
686420a
api client fix
dcarbone Dec 18, 2024
95af814
need to define a couple response exceptions
dcarbone Dec 19, 2024
36ed9e0
enum
dcarbone Dec 20, 2024
99088df
adding some typed exceptions
dcarbone Dec 20, 2024
7ec4980
derp
dcarbone Dec 20, 2024
d9694b2
sure.
dcarbone Dec 20, 2024
a133f31
probably need to re-design tests...
dcarbone Dec 21, 2024
056ea90
removing test endpoint from config
dcarbone Dec 21, 2024
c9cbff9
sure.
dcarbone Dec 21, 2024
011f22b
brainfart
dcarbone Dec 21, 2024
8b2ab16
more brain fart
dcarbone Dec 21, 2024
07af562
move test endpoint into phpunit config
dcarbone Dec 21, 2024
6b12d8c
sigh.
dcarbone Dec 21, 2024
e627fb5
siiiiggghhh
dcarbone Dec 21, 2024
05f4c5e
O_O
dcarbone Dec 21, 2024
bc18d5a
disabling validator tests
dcarbone Dec 21, 2024
0535136
don't try to construct abstract parents
dcarbone Dec 21, 2024
c255e74
autoloader improvements, small testing improvements
dcarbone Dec 22, 2024
b391ffd
shut up github action warnings
dcarbone Dec 22, 2024
3f4e032
adding skipped and warning printing
dcarbone Dec 22, 2024
f0b2b0d
use nih for stu3 and r4
dcarbone Dec 22, 2024
c445a97
don't fuss with storing test resources
dcarbone Dec 22, 2024
8071945
fixing github action step id reference
dcarbone Dec 22, 2024
6b9fa90
no fixes, thinking through stuff.
dcarbone Dec 22, 2024
90fd2e6
tests still need some work.
dcarbone Dec 24, 2024
53c965f
fixing a few deprecations, adding 8.4 to test matrix
dcarbone Dec 26, 2024
5308eb3
working on core tests a bit
dcarbone Dec 26, 2024
60e4fb6
skip FHIR sources for Core
dcarbone Dec 26, 2024
eb1e968
thinking what to do with generator
dcarbone Dec 28, 2024
1f2bdb3
cleanup, adding R4B
dcarbone Dec 28, 2024
13f73de
small cleanup
dcarbone Dec 28, 2024
65074a3
much better determination of 'special' dstu1 stuff
dcarbone Dec 28, 2024
09c193a
moving validator from trait to core class
dcarbone Dec 29, 2024
e9b9e3f
r4b test support and better trait output
dcarbone Dec 29, 2024
ec9220d
re-thinking autoloader, config, and execution a bit
dcarbone Dec 29, 2024
43ebe79
sure, mess with it more later.
dcarbone Dec 29, 2024
c325810
enable only testing and generating core classes
dcarbone Dec 29, 2024
7fa882e
fixing core factory test
dcarbone Dec 30, 2024
33ed442
\Iterator -> iterable
dcarbone Dec 30, 2024
368b742
small updates, working on fleshing out client
dcarbone Dec 30, 2024
25bbc95
simplfying templates a bit, adding ID access for resources in client,…
dcarbone Dec 30, 2024
5b0352a
more template coalescing
dcarbone Dec 30, 2024
3243c8b
validations cleanup and fleshing out api client a little bit
dcarbone Dec 30, 2024
bb6fb53
odd php 8.4 error
dcarbone Dec 30, 2024
dd5f057
forgot to update test for 8.4
dcarbone Dec 30, 2024
95dc360
i see what i did.
dcarbone Dec 30, 2024
f591be5
remove explicit phpunit run flags
dcarbone Dec 30, 2024
6cbf121
removing source url from version as it doesn't makes sense
dcarbone Dec 30, 2024
9101b59
beginning rewrite of templating and generation system.
dcarbone Dec 31, 2024
ac42030
fixing factory config test
dcarbone Dec 31, 2024
191e94b
more template merging, too many dang files.
dcarbone Jan 3, 2025
6b77430
closer.
dcarbone Jan 4, 2025
0d98ebd
refactoring import system to suck a little less
dcarbone Jan 5, 2025
04c2fb3
further improvements to import management
dcarbone Jan 5, 2025
0c24ac3
lots of cleanup, some stupid bug somewhere
dcarbone Jan 5, 2025
e480572
propertly handle resource container type references
dcarbone Jan 6, 2025
6f6df20
formatting improvements
dcarbone Jan 6, 2025
86ab3bc
simplifying resource container implementation
dcarbone Jan 6, 2025
b934b89
more template cleanup
dcarbone Jan 6, 2025
2a5e411
small client updates
dcarbone Jan 6, 2025
92ea125
small client updates while I procrastinate on tests
dcarbone Jan 6, 2025
b66edd8
small client updates while I procrastinate on tests
dcarbone Jan 6, 2025
64911a6
refactoring property creation and overloading
dcarbone Jan 7, 2025
2da2e15
need to refactor validation implementation
dcarbone Jan 7, 2025
ca2b376
working on adding field parameters to constructors
dcarbone Jan 7, 2025
3e5cc08
this is gonna be neat.
dcarbone Jan 7, 2025
30a6185
getting there
dcarbone Jan 7, 2025
5ed590e
more named param work
dcarbone Jan 8, 2025
812c081
dude in coffee shop needs a friggin shower, holy hell i'm out.
dcarbone Jan 8, 2025
48204e5
more named property funtimes
dcarbone Jan 8, 2025
aced606
more named parameter improvements
dcarbone Jan 8, 2025
0721106
moving xml location to constructor
dcarbone Jan 9, 2025
e9571bf
some xml unserialization work
dcarbone Jan 9, 2025
0a0b2c5
removing generators, not useful, xml is probably good?
dcarbone Jan 9, 2025
3136e13
no more default values, no more default values, no more default value…
dcarbone Jan 9, 2025
4fa1ed3
no more nulls.
dcarbone Jan 9, 2025
3356cda
more efficient json serialization
dcarbone Jan 10, 2025
103539e
lazy way to handle div elements
dcarbone Jan 10, 2025
ac7693a
small cleanup, getting json unserialization prepped
dcarbone Jan 10, 2025
af91fd6
simplifying xhml type and xmlwriter class
dcarbone Jan 10, 2025
082c16e
little more work on serialization
dcarbone Jan 11, 2025
609d779
basic json unserialize done
dcarbone Jan 11, 2025
6bed7a0
simplifying generate script, config through named params.
dcarbone Jan 13, 2025
cdca346
debugging github actions a bit
dcarbone Jan 13, 2025
7a3d437
better grouping
dcarbone Jan 13, 2025
8441e51
bit lazy, but w/e
dcarbone Jan 13, 2025
07a350b
couple of fixes, targeted test config
dcarbone Jan 13, 2025
8a1a4da
remove generate.sh call in test workflow
dcarbone Jan 13, 2025
1edd285
enabling contained types to be set through a container instance
dcarbone Jan 13, 2025
1d32c6a
version api client fixes
dcarbone Jan 13, 2025
2d3ea4b
use underscore with xml location trait
dcarbone Jan 13, 2025
9398814
boooooootstrap
dcarbone Jan 13, 2025
6d16529
copyright
dcarbone Jan 14, 2025
b3034e9
some thoughts on test while i work on docs
dcarbone Jan 14, 2025
9b690a9
small updates
dcarbone Jan 14, 2025
52bce9f
cleaning up example config
dcarbone Jan 15, 2025
e5eb09c
little bit of docs
dcarbone Jan 15, 2025
4ca285d
small fixes, cleanup, removing Factory type until I can dedicate time…
dcarbone Jan 15, 2025
33234b8
some tests
dcarbone Jan 15, 2025
983583e
xmlwriter improvements and some tests
dcarbone Jan 16, 2025
de28e24
little bit of cleanup, adding few basic client unit tests
dcarbone Jan 16, 2025
617c2d8
some cleanup, adding beginnings of Builder tests
dcarbone Jan 16, 2025
e6d3566
forgot shell
dcarbone Jan 16, 2025
9aa6de3
derp.
dcarbone Jan 16, 2025
d7f1280
wtf.
dcarbone Jan 16, 2025
c95b801
derp.
dcarbone Jan 16, 2025
677b53c
readme
dcarbone Jan 16, 2025
6b4b748
couple fixes, need to finish json unserialize for primitives
dcarbone Jan 17, 2025
8aab701
more cleanup of root namespace, re-thinking xml value location implem…
dcarbone Jan 17, 2025
9fc0e72
version type map ref fix
dcarbone Jan 17, 2025
09a7acd
couple of fixes for primitives
dcarbone Jan 17, 2025
b9c63ae
trying out services config
dcarbone Jan 20, 2025
6b6d372
rethinking where tests are placed, needs more work.
dcarbone Jan 21, 2025
a9ef09f
lil test fixes
dcarbone Jan 21, 2025
083593f
i dunno probably do better with this later.
dcarbone Jan 21, 2025
9d246ac
slightly better test config runtime
dcarbone Jan 21, 2025
a1e8ab0
lots of work on type testing
dcarbone Jan 22, 2025
56313c9
more work on json encoding, need to fix xhtml type
dcarbone Jan 22, 2025
2979ac3
halfway fix for xhtml, v5 will require better templating and typing s…
dcarbone Jan 23, 2025
4e5ac02
bumping precision in tests
dcarbone Jan 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
/README.md export-ignore
/output export-ignore
/input export-ignore
/phpunit export-ignore
/phpunit export-ignore
fhir_test_resources.tar.gz export-ignore
13 changes: 1 addition & 12 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,2 @@
# These are supported funding model platforms

github: dcarbone
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: dcarbone
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
ko_fi: dcarbone
73 changes: 73 additions & 0 deletions .github/actions/bootstrap/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: 'Bootstrap'
description: 'Bootstraps the GHA runner for Builder tests'

inputs:
php-version:
required: true
description: 'PHP version to use for tests'

runs:
using: composite
steps:
- name: 'Define vars'
id: vars
shell: bash -e {0}
# language=sh
run: |
_phpunit_version=
case "${{ inputs.php-version }}" in
8.1) _phpunit_version='10.5' ;;
8.2) _phpunit_version='11.1' ;;
8.3) _phpunit_version='11.1' ;;
8.4) _phpunit_version='11.1' ;;
*) echo "Unsupported PHP version: ${{ inputs.php-version }}" && exit 1 ;;
esac
echo "phpunit-version=${_phpunit_version}" >> $GITHUB_OUTPUT

- name: 'Install PHP'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ inputs.php-version }}
extensions: libxml simplexml json zip
ini-values: precision=20

- name: 'Install jq'
uses: dcarbone/install-jq-action@v3
with:
force: true

- name: 'Set composer dep versions'
shell: bash -e {0}
# language=sh
run: |
tmpf="$(mktemp)"
jq -rcM '."require-dev"."phpunit/phpunit" = "^${{ steps.vars.outputs.phpunit-version }}"' composer.json > "${tmpf}"
mv "${tmpf}" composer.json

- name: 'Get composer cache directory'
id: composer-cache
shell: bash -e {0}
# language=sh
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: 'Init composer dep cache'
id: cache
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "composer-${{ runner.os }}-${{ inputs.php-version }}-${{ steps.vars.outputs.phpunit-version }}-${{ hashFiles('composer.lock') }}"

- name: 'Install composer deps'
shell: bash -e {0}
# language=sh
run: |
rm composer.lock
composer update --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: 'Save composer dep cache'
if: steps.cache.outputs.cache-hit != 'true' && steps.cache.outputs.cache-hit != true
uses: actions/cache/save@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: "composer-${{ runner.os }}-${{ inputs.php-version }}-${{ steps.vars.outputs.phpunit-version }}-${{ hashFiles('composer.lock') }}"
7 changes: 3 additions & 4 deletions .github/actions/load-fhir-validator/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ runs:
echo 'url=${{ inputs.base-url }}/${{ inputs.version }}/${{ inputs.filename }}' >> $GITHUB_OUTPUT
echo 'cache-key=fhir-validator-${{ inputs.version }}-2' >> $GITHUB_OUTPUT

- uses: actions/cache@v4
id: cache
- name: 'Init validator cache'
uses: actions/cache@v4
id: validator-cache
with:
path: |
${{ github.workspace }}/bin
/home/runner/.fhir
key: '${{ steps.vars.outputs.cache-key }}'
save-always: true

- name: 'Install Java'
if: steps.cache.outputs.cache-hit != 'true' && steps.cache.outputs.cache-hit != true
Expand Down Expand Up @@ -62,4 +62,3 @@ runs:
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 4.3.0
java -jar '${{ github.workspace }}/bin/validator_cli.jar' -version 5.0.0
echo '::endgroup::'

40 changes: 35 additions & 5 deletions .github/actions/load-fhir-xsd/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ outputs:
cache-key:
description: 'Actions Cache key'
value: '${{ steps.vars.cache-key }}'
cache-dir:
description: 'Root Cache directory'
value: '${{ steps.vars.cache-dir }}'
version-xsd-cache-dir:
description: 'Specific version XSD cache directory'
value: '${{ steps.vars.version-xsd-cache-dir }}'

runs:
using: composite
Expand All @@ -37,12 +43,12 @@ runs:
_cache_key="fhir-source-${{ inputs.version }}-${_month}-1"
_dl_url="${{ inputs.base-url}}/${{ inputs.version }}/${{ inputs.filename }}"
_cache_dir="${{ github.workspace }}/input"
_xsd_cache_dir="${_cache_dir}/${{ inputs.version }}"
_version_xsd_cache_dir="${_cache_dir}/${{ inputs.version }}"
_zip_filename="${_cache_dir}/${{ inputs.version }}.zip"

echo "cache-key=${_cache_key}" >> $GITHUB_OUTPUT
echo "cache-dir=${_cache_dir}" >> $GITHUB_OUTPUT
echo "xsd-cache-dir=${_xsd_cache_dir}" >> $GITHUB_OUTPUT
echo "version-xsd-cache-dir=${_version_xsd_cache_dir}" >> $GITHUB_OUTPUT
echo "url=${_dl_url}" >> $GITHUB_OUTPUT
echo "zip-filename=${_zip_filename}" >> $GITHUB_OUTPUT

Expand All @@ -57,15 +63,39 @@ runs:
shell: bash -e {0}
# language=sh
run: |
mkdir -p '${{ steps.vars.outputs.xsd-cache-dir }}'
echo "::group::Ensuring cache directory exists"
mkdir -p '${{ steps.vars.outputs.version-xsd-cache-dir }}'
echo "::endgroup::"

echo "::group::Downloading '${{ steps.vars.outputs.url }}'"
curl \
-L \
-A '${{ inputs.user-agent }}' \
-o '${{ steps.vars.outputs.zip-filename }}' \
'${{ steps.vars.outputs.url }}'
echo "::endgroup::"

unzip -o -qq '${{ steps.vars.outputs.zip-filename }}' -d '${{ steps.vars.outputs.xsd-cache-dir }}'
echo "::group::Unzipping '${{ steps.vars.outputs.zip-filename }}'"
unzip -o -qq '${{ steps.vars.outputs.zip-filename }}' -d '${{ steps.vars.outputs.version-xsd-cache-dir }}'
echo "::endgroup::"

if [ -d '${{ steps.vars.outputs.version-xsd-cache-dir }}/fhir-all-xsd' ]; then
echo "::group::Zip was created on MacOS, cleaning up..."

mv '${{ steps.vars.outputs.version-xsd-cache-dir }}/fhir-all-xsd'/* '${{ steps.vars.outputs.version-xsd-cache-dir }}'
rmdir '${{ steps.vars.outputs.version-xsd-cache-dir }}/fhir-all-xsd'

echo "::endgroup::"
fi

- name: 'List files'
shell: bash -e {0}
# language=sh
run: |
echo "::group::Listing files in '${{ steps.vars.outputs.cache-dir }}'"
ls -l '${{ steps.vars.outputs.cache-dir}}'
ls -l '${{ steps.vars.outputs.xsd-cache-dir }}'
echo "::endgroup::"

echo "::group::Listing files in '${{ steps.vars.outputs.version-xsd-cache-dir }}'"
ls -l '${{ steps.vars.outputs.version-xsd-cache-dir }}'
echo "::endgroup::"
145 changes: 60 additions & 85 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,110 +26,85 @@ on:
- '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-latest
runs-on: ubuntu-22.04
strategy:
fail-fast: true
matrix:
fhir-version: [ 'DSTU1', 'DSTU2', 'STU3', 'R4', 'R5' ]

name: 'Download ${{ matrix.fhir-version }} Source'
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.fhir-version }}'


# load-fhir-validator:
# runs-on: ubuntu-22.04
# name: 'Download FHIR Validator'
# steps:
# - uses: actions/checkout@v4
#
# - uses: ./.github/actions/load-fhir-validator
version: '${{ matrix.test-target }}'

run:
runs-on: ubuntu-22.04
needs:
- load-fhir-source
# - load-fhir-validator
strategy:
fail-fast: false
matrix:
php-version: [ '8.1', '8.2', '8.3' ]
fhir-version: [ 'DSTU1', 'DSTU2', 'STU3', 'R4', 'R5' ]
include:
- php-version: '8.1'
phpunit-version: '10.5'
- php-version: '8.2'
phpunit-version: '11.1'
- php-version: '8.3'
phpunit-version: '11.1'
name: '${{ matrix.fhir-version }} - PHP ${{ matrix.php-version }} - PHPUnit ${{ matrix.phpunit-version }}'
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:
- name: 'Check the stuff out'
uses: actions/checkout@v4

- name: 'Load FHIR ${{ matrix.fhir-version }} Source'
uses: ./.github/actions/load-fhir-xsd
with:
version: '${{ matrix.fhir-version }}'

# - name: 'Install FHIR validator'
# uses: ./.github/actions/load-fhir-validator

- name: 'Install PHP'
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: libxml simplexml json zip
ini-values: precision=20

- name: 'Install jq'
uses: dcarbone/install-jq-action@v3
- uses: actions/checkout@v4
- name: 'Bootstrap'
uses: ./.github/actions/bootstrap
with:
force: true

- name: 'Set Composer Dep Versions'
# language=sh
run: |
tmpf="$(mktemp)"
jq -rcM '."require-dev"."phpunit/phpunit" = "^${{ matrix.phpunit-version }}"' composer.json > "${tmpf}"
mv "${tmpf}" composer.json

- name: 'Get Composer Cache Directory'
id: composer-cache
# language=sh
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT

- name: 'Cache Composer Stuff'
uses: actions/cache@v4
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:
path: ${{ steps.composer-cache.outputs.dir }}
key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.phpunit-version }}-${{ hashFiles('composer.lock') }}"
save-always: true

- name: 'Install Composer deps'
# language=sh
run: |
rm composer.lock
composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist

- name: 'Generate code'
# language=sh
run: |
./bin/generate.sh --useExisting --versions '${{ matrix.fhir-version }}'

# - name: 'Install Java'
# uses: actions/setup-java@v4
# with:
# distribution: 'zulu'
# java-version: 18

version: '${{ matrix.test-target }}'
- name: 'Run tests'
# language=sh
run: |
./vendor/bin/phpunit -c 'phpunit/${{ matrix.fhir-version }}.xml'
./vendor/bin/phpunit -c 'phpunit/${{ matrix.test-target }}.xml'
Loading
Loading