Skip to content

Commit

Permalink
Enhancement: Split compiling and testing Phar
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Feb 4, 2024
1 parent d09ea05 commit 2694966
Showing 1 changed file with 29 additions and 11 deletions.
40 changes: 29 additions & 11 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,9 +163,6 @@ jobs:
dependencies:
- "locked"

env:
PHPUNIT_SLOW_TEST_DETECTOR_PHAR: ".build/phar/phpunit-slow-test-detector.phar"

steps:
- name: "Checkout"
uses: "actions/[email protected]"
Expand Down Expand Up @@ -218,16 +215,15 @@ jobs:
run: ".phive/box compile --ansi --config=box.json"

- name: "Show info about phpunit-slow-test-detector.phar with humbug/box"
run: ".phive/box info ${{ env.PHPUNIT_SLOW_TEST_DETECTOR_PHAR }} --ansi --list"
run: ".phive/box info .build/phar/phpunit-slow-test-detector.phar --ansi --list"

- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
uses: "ergebnis/.github/actions/composer/[email protected].0"
- name: "Upload Phar"
uses: "actions/[email protected].0"
with:
dependencies: "${{ matrix.dependencies }}"
working-directory: "test/Phar/Version10/"

- name: "Run phar tests with phpunit/phpunit"
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"
name: "phpunit-slow-test-detector-phar"
overwrite: true
path: ".build/phar/phpunit-slow-test-detector.phar"
retention-days: 1

dependency-analysis:
name: "Dependency Analysis"
Expand Down Expand Up @@ -451,6 +447,9 @@ jobs:

timeout-minutes: 5

needs:
- "compile-phar"

strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -591,3 +590,22 @@ jobs:
- name: "Run end-to-end tests with phpunit/phpunit:11.0.x-dev"
if: "matrix.phpunit-version == '11.0.x-dev'"
run: "vendor/bin/phpunit --colors=always --configuration=test/EndToEnd/Version11/phpunit.xml"

- name: "Download Phar"
if: "matrix.phpunit-version == '10.0.0'"
uses: "actions/[email protected]"
with:
name: "phpunit-slow-test-detector-phar"
path: ".build/phar/phpunit-slow-test-detector.phar"

- name: "Install ${{ matrix.dependencies }} dependencies for running phar tests with composer"
if: "matrix.phpunit-version == '10.0.0'"
uses: "ergebnis/.github/actions/composer/[email protected]"
with:
dependencies: "${{ matrix.dependencies }}"
working-directory: "test/Phar/Version10/"

- name: "Run phar tests with phpunit/phpunit"
if: "matrix.phpunit-version == '10.0.0'"
run: "test/Phar/Version10/vendor/bin/phpunit --colors=always --configuration=test/Phar/Version10/phpunit.xml"

0 comments on commit 2694966

Please sign in to comment.