Skip to content

Commit

Permalink
Run the CI with the phar
Browse files Browse the repository at this point in the history
  • Loading branch information
lyrixx committed Feb 1, 2024
1 parent f2f684e commit ac537e9
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,16 @@ jobs:
REQUIRE_DEV: true

phpunit:
name: PHPUnit on ${{ matrix.php }}
name: "PHPUnit on ${{ matrix.php }} ${{ matrix.phar && '(with phar)' || '' }}"
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [ "8.1", "8.2", "8.3" ]
phar: [ false ]
include:
- php: "8.1"
phar: true
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -58,6 +62,11 @@ jobs:
run: composer install --prefer-dist --no-progress --optimize-autoloader --classmap-authoritative
working-directory: tools/phar

- name: Compile phar Linux
run: bin/castor castor:phar:linux
shell: bash
if: matrix.phar

- name: Link box
run: sudo ln -s $GITHUB_WORKSPACE/tools/phar/vendor/bin/box /usr/local/bin/box

Expand All @@ -66,6 +75,8 @@ jobs:

- name: Run tests
run: vendor/bin/simple-phpunit
env:
CASTOR_BIN: ${{ github.workspace }}/${{ matrix.phar && 'tools/phar/build/castor.linux-amd64.phar' || 'bin/castor'}}

phar:
name: Ensure PHAR is OK
Expand Down

0 comments on commit ac537e9

Please sign in to comment.