|
26 | 26 | - 'phpunit.xml' |
27 | 27 |
|
28 | 28 | jobs: |
| 29 | + builder-tests: |
| 30 | + runs-on: ubuntu-22.04 |
| 31 | + strategy: |
| 32 | + fail-fast: false |
| 33 | + matrix: |
| 34 | + php-version: |
| 35 | + - '8.1' |
| 36 | + - '8.2' |
| 37 | + - '8.3' |
| 38 | + - '8.4' |
| 39 | + name: 'Builder Tests - PHP ${{ matrix.php-version }}' |
| 40 | + steps: |
| 41 | + - uses: actions/checkout@v4 |
| 42 | + - name: 'Bootstrap' |
| 43 | + uses: ./.github/actions/bootstrap |
| 44 | + with: |
| 45 | + php-version: ${{ matrix.php-version }} |
| 46 | + - name: 'Run tests' |
| 47 | + # language=sh |
| 48 | + run: ./vendor/bin/phpunit -c 'phpunit/Builder.xml' |
| 49 | + |
29 | 50 | load-fhir-source: |
30 | | - runs-on: ubuntu-latest |
| 51 | + runs-on: ubuntu-22.04 |
31 | 52 | strategy: |
32 | 53 | fail-fast: true |
33 | 54 | matrix: |
34 | | - fhir-version: [ 'DSTU1', 'DSTU2', 'STU3', 'R4', 'R5' ] |
35 | | - |
36 | | - name: 'Download ${{ matrix.fhir-version }} Source' |
| 55 | + test-target: |
| 56 | + - 'DSTU1' |
| 57 | + - 'DSTU2' |
| 58 | + - 'STU3' |
| 59 | + - 'R4' |
| 60 | + - 'R4B' |
| 61 | + - 'R5' |
| 62 | + name: 'Download ${{ matrix.test-target }} Source' |
37 | 63 | steps: |
38 | 64 | - uses: actions/checkout@v4 |
39 | | - |
40 | 65 | - uses: ./.github/actions/load-fhir-xsd |
41 | 66 | with: |
42 | | - version: '${{ matrix.fhir-version }}' |
43 | | - |
44 | | - |
45 | | -# load-fhir-validator: |
46 | | -# runs-on: ubuntu-22.04 |
47 | | -# name: 'Download FHIR Validator' |
48 | | -# steps: |
49 | | -# - uses: actions/checkout@v4 |
50 | | -# |
51 | | -# - uses: ./.github/actions/load-fhir-validator |
| 67 | + version: '${{ matrix.test-target }}' |
52 | 68 |
|
53 | 69 | run: |
54 | 70 | runs-on: ubuntu-22.04 |
55 | 71 | needs: |
56 | 72 | - load-fhir-source |
57 | | -# - load-fhir-validator |
58 | 73 | strategy: |
59 | 74 | fail-fast: false |
60 | 75 | matrix: |
61 | | - php-version: [ '8.1', '8.2', '8.3' ] |
62 | | - fhir-version: [ 'DSTU1', 'DSTU2', 'STU3', 'R4', 'R5' ] |
63 | | - include: |
64 | | - - php-version: '8.1' |
65 | | - phpunit-version: '10.5' |
66 | | - - php-version: '8.2' |
67 | | - phpunit-version: '11.1' |
68 | | - - php-version: '8.3' |
69 | | - phpunit-version: '11.1' |
70 | | - name: '${{ matrix.fhir-version }} - PHP ${{ matrix.php-version }} - PHPUnit ${{ matrix.phpunit-version }}' |
| 76 | + php-version: |
| 77 | + - '8.1' |
| 78 | + - '8.2' |
| 79 | + - '8.3' |
| 80 | + - '8.4' |
| 81 | + test-target: |
| 82 | + - 'Core' |
| 83 | + - 'DSTU1' |
| 84 | + - 'DSTU2' |
| 85 | + - 'STU3' |
| 86 | + - 'R4' |
| 87 | + - 'R4B' |
| 88 | + - 'R5' |
| 89 | + name: '${{ matrix.test-target }} - PHP ${{ matrix.php-version }} - PHPUnit ${{ matrix.phpunit-version }}' |
| 90 | + services: |
| 91 | + php-fhir-test-server: |
| 92 | + image: dancarbone/php-fhir-test-server:latest |
| 93 | + ports: |
| 94 | + - '8080:8080' |
71 | 95 | steps: |
72 | | - - name: 'Check the stuff out' |
73 | | - uses: actions/checkout@v4 |
74 | | - |
75 | | - - name: 'Load FHIR ${{ matrix.fhir-version }} Source' |
76 | | - uses: ./.github/actions/load-fhir-xsd |
77 | | - with: |
78 | | - version: '${{ matrix.fhir-version }}' |
79 | | - |
80 | | -# - name: 'Install FHIR validator' |
81 | | -# uses: ./.github/actions/load-fhir-validator |
82 | | - |
83 | | - - name: 'Install PHP' |
84 | | - uses: shivammathur/setup-php@v2 |
85 | | - with: |
86 | | - php-version: ${{ matrix.php-version }} |
87 | | - extensions: libxml simplexml json zip |
88 | | - ini-values: precision=20 |
89 | | - |
90 | | - - name: 'Install jq' |
91 | | - uses: dcarbone/install-jq-action@v3 |
| 96 | + - uses: actions/checkout@v4 |
| 97 | + - name: 'Bootstrap' |
| 98 | + uses: ./.github/actions/bootstrap |
92 | 99 | with: |
93 | | - force: true |
94 | | - |
95 | | - - name: 'Set Composer Dep Versions' |
96 | | - # language=sh |
97 | | - run: | |
98 | | - tmpf="$(mktemp)" |
99 | | - jq -rcM '."require-dev"."phpunit/phpunit" = "^${{ matrix.phpunit-version }}"' composer.json > "${tmpf}" |
100 | | - mv "${tmpf}" composer.json |
101 | | -
|
102 | | - - name: 'Get Composer Cache Directory' |
103 | | - id: composer-cache |
104 | | - # language=sh |
105 | | - run: | |
106 | | - echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT |
107 | | -
|
108 | | - - name: 'Cache Composer Stuff' |
109 | | - uses: actions/cache@v4 |
| 100 | + php-version: ${{ matrix.php-version }} |
| 101 | + - name: 'Load FHIR ${{ matrix.test-target }} Source' |
| 102 | + id: fhir-source |
| 103 | + if: matrix.test-target != 'Core' |
| 104 | + uses: ./.github/actions/load-fhir-xsd |
110 | 105 | with: |
111 | | - path: ${{ steps.composer-cache.outputs.dir }} |
112 | | - key: "composer-${{ runner.os }}-${{ matrix.php-version }}-${{ matrix.phpunit-version }}-${{ hashFiles('composer.lock') }}" |
113 | | - save-always: true |
114 | | - |
115 | | - - name: 'Install Composer deps' |
116 | | - # language=sh |
117 | | - run: | |
118 | | - rm composer.lock |
119 | | - composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist |
120 | | -
|
121 | | - - name: 'Generate code' |
122 | | - # language=sh |
123 | | - run: | |
124 | | - ./bin/generate.sh --useExisting --versions '${{ matrix.fhir-version }}' |
125 | | -
|
126 | | -# - name: 'Install Java' |
127 | | -# uses: actions/setup-java@v4 |
128 | | -# with: |
129 | | -# distribution: 'zulu' |
130 | | -# java-version: 18 |
131 | | - |
| 106 | + version: '${{ matrix.test-target }}' |
132 | 107 | - name: 'Run tests' |
133 | 108 | # language=sh |
134 | 109 | run: | |
135 | | - ./vendor/bin/phpunit -c 'phpunit/${{ matrix.fhir-version }}.xml' |
| 110 | + ./vendor/bin/phpunit -c 'phpunit/${{ matrix.test-target }}.xml' |
0 commit comments