Skip to content

Commit

Permalink
Backport #5577 to PHPUnit 8.5
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Nov 27, 2023
1 parent c1e27da commit 518f892
Show file tree
Hide file tree
Showing 4 changed files with 1,353 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
tools: none

- name: Install dependencies with Composer
run: ./tools/composer update --no-interaction --no-ansi --no-progress
run: ./tools/composer install --no-interaction --no-ansi --no-progress

- name: Run Psalm on public API
run: ./tools/psalm --config=.psalm/static-analysis.xml --no-progress --show-info=false
Expand Down Expand Up @@ -102,7 +102,7 @@ jobs:
tools: none

- name: Install dependencies with Composer
run: php ./tools/composer update --no-ansi --no-interaction --no-progress
run: php ./tools/composer install --no-ansi --no-interaction --no-progress

- name: Run tests with PHPUnit
run: php ./phpunit --testsuite unit
Expand Down Expand Up @@ -153,7 +153,7 @@ jobs:
tools: none

- name: Install dependencies with Composer
run: php ./tools/composer update --no-ansi --no-interaction --no-progress
run: php ./tools/composer install --no-ansi --no-interaction --no-progress

- name: Run tests with PHPUnit
run: php ./phpunit --testsuite end-to-end
Expand All @@ -180,7 +180,7 @@ jobs:
tools: none

- name: Install dependencies with Composer
run: ./tools/composer update --no-ansi --no-interaction --no-progress
run: ./tools/composer install --no-ansi --no-interaction --no-progress

- name: Collect code coverage with PHPUnit
run: ./phpunit --coverage-clover=coverage.xml
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

# Composer
/vendor
/composer.lock

# Apache Ant
/.ant_targets
Expand Down
7 changes: 3 additions & 4 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
<delete dir="${basedir}/build/artifacts"/>
<delete dir="${basedir}/build/tmp"/>
<delete dir="${basedir}/vendor"/>
<delete file="${basedir}/composer.lock"/>

<property name="clean.done" value="true"/>
</target>
Expand All @@ -30,11 +29,12 @@
</target>

<target name="-dependencies-installed">
<available file="${basedir}/composer.lock" property="dependencies-installed"/>
<available type="dir" file="${basedir}/vendor" property="dependencies-installed"/>
</target>

<target name="install-dependencies" unless="dependencies-installed" depends="-dependencies-installed,validate-composer-json" description="Install dependencies with Composer">
<copy file="${basedir}/composer.json" tofile="${basedir}/build/tmp/composer.json"/>
<copy file="${basedir}/composer.lock" tofile="${basedir}/build/tmp/composer.lock"/>

<exec executable="${basedir}/tools/composer" taskname="composer">
<arg value="require"/>
Expand All @@ -50,6 +50,7 @@
</exec>

<move file="${basedir}/build/tmp/composer.json" tofile="${basedir}/composer.json"/>
<move file="${basedir}/build/tmp/composer.lock" tofile="${basedir}/composer.lock"/>
</target>

<target name="check-dependencies" description="Performs check for outdated dependencies">
Expand Down Expand Up @@ -435,7 +436,6 @@

<target name="build-phar-and-run-phar-specific-tests" depends="clean,phar-snapshot" description="Build PHAR and run the PHAR-specific tests with it">
<delete dir="${basedir}/vendor"/>
<delete file="${basedir}/composer.lock"/>

<antcall target="run-phar-specific-tests"/>
</target>
Expand All @@ -450,7 +450,6 @@

<target name="build-phar-and-run-phar-specific-tests-without-code-coverage" depends="clean,phar-snapshot" description="Build PHAR and run the PHAR-specific tests with it without code coverage">
<delete dir="${basedir}/vendor"/>
<delete file="${basedir}/composer.lock"/>

<antcall target="run-phar-specific-tests-without-code-coverage"/>
</target>
Expand Down

0 comments on commit 518f892

Please sign in to comment.