Merge pull request #67 from asgrim/remove-missing-tag-workaround-for-box #119
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' | |
- '8.4' | |
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 | |
# temporarily remove Psalm until ready for PHP 8.4 | |
- name: remove psalm | |
if: matrix.php-versions == '8.4' | |
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin | |
- 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 | |
behaviour-tests: | |
runs-on: ${{ matrix.operating-system }} | |
strategy: | |
matrix: | |
operating-system: | |
- ubuntu-latest | |
- windows-latest | |
php-versions: | |
- '8.1' | |
- '8.2' | |
- '8.3' | |
- '8.4' | |
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 | |
# temporarily remove Psalm until ready for PHP 8.4 | |
- name: remove psalm | |
if: matrix.php-versions == '8.4' | |
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin | |
- uses: ramsey/composer-install@v3 | |
- name: Run Behat on Windows | |
if: matrix.operating-system == 'windows-latest' | |
run: vendor/bin/behat --tags="~@non-windows" | |
- name: Run Behat on non-Windows | |
if: matrix.operating-system != 'windows-latest' | |
run: vendor/bin/behat | |
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 | |
uses: ./.github/workflows/release-unsigned-phar.yml |