refactor(filesystem): move from package to functions #1818
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Isolated tests | |
on: | |
pull_request: | |
workflow_dispatch: | |
schedule: | |
- cron: '0 0 * * *' | |
jobs: | |
get_packages: | |
name: Get packages | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
coverage: none | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Get packages | |
id: get_json | |
run: echo "json=$(bin/get-packages)" >> $GITHUB_OUTPUT | |
- name: Output packages | |
run: echo "${{ steps.get_json.outputs.json }}" | |
outputs: | |
matrix: ${{ steps.get_json.outputs.json }} | |
phpunit: | |
runs-on: ${{ matrix.os }} | |
needs: get_packages | |
strategy: | |
fail-fast: false | |
matrix: | |
os: | |
- ubuntu-latest | |
package: ${{ fromJson(needs.get_packages.outputs.matrix) }} | |
php: | |
- 8.4 | |
stability: | |
- prefer-stable | |
- prefer-lowest | |
name: "Run tests: ${{ matrix.package.name }} - PHP ${{ matrix.php }} - ${{ matrix.stability }}" | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
extensions: dom, curl, libxml, mbstring, pcntl, fileinfo | |
coverage: pcov | |
- name: Install PHPUnit | |
run: composer global require phpunit/phpunit:^11.5.17 | |
- name: Setup problem matchers | |
run: | | |
echo "::add-matcher::${{ runner.tool_cache }}/php.json" | |
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | |
- name: Install dependencies | |
run: | | |
./bin/build-changed-packages | |
cd "src/Tempest/${{ matrix.package.basename }}" | |
composer update --${{ matrix.stability }} --prefer-dist --no-interaction | |
- name: Execute tests | |
run: phpunit -c "src/Tempest/${{ matrix.package.basename }}/phpunit.xml" |