Fix php binary path with older php versions #82
Workflow file for this run
This file contains 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: "Continuous Integration" | |
on: | |
pull_request: | |
push: | |
jobs: | |
unit-tests: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: | |
- ubuntu-latest | |
- windows-latest | |
php-versions: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-versions }} | |
extensions: intl, sodium, zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: ramsey/composer-install@v3 | |
- name: Run PHPUnit on Windows | |
if: matrix.operating-system == 'windows-latest' | |
run: vendor/bin/phpunit | |
- name: Run PHPUnit on non-Windows | |
if: matrix.operating-system != 'windows-latest' | |
run: sudo vendor/bin/phpunit | |
coding-standards: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
extensions: intl, sodium, zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: ramsey/composer-install@v3 | |
- name: Run PHPCS | |
run: vendor/bin/phpcs | |
static-analysis: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.1 | |
extensions: intl, sodium, zip | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- uses: actions/checkout@v4 | |
- uses: ramsey/composer-install@v3 | |
- name: Run Psalm | |
run: vendor/bin/psalm | |
build-phar: | |
needs: | |
- unit-tests | |
- coding-standards | |
- static-analysis | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: | |
- ubuntu-latest | |
php-versions: | |
- '8.1' | |
steps: | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
coverage: none | |
tools: composer, box | |
php-version: "${{ matrix.php-version }}" | |
- uses: actions/checkout@v4 | |
- uses: ramsey/composer-install@v3 | |
- name: Build PHAR | |
run: box compile | |
- name: Check the PHAR executes | |
run: php pie.phar --version | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: pie-${{ github.sha }}.phar | |
path: pie.phar |