Fix CI label #122
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
max-parallel: 1 | |
matrix: | |
php: | |
- 8.1 | |
- 8.2 | |
dependencies: | |
- locked | |
- lowest | |
- highest | |
name: PHP ${{ matrix.php }} - ${{ matrix.dependencies }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
- name: Install tsx | |
run: npm install -g tsx | |
- uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php }} | |
tools: php-cs-fixer, phpunit | |
coverage: ${{ matrix.php == '8.1' && matrix.dependencies == 'locked' && 'xdebug' || 'none' }} | |
- uses: ramsey/composer-install@v3 | |
with: | |
dependency-versions: ${{ matrix.dependencies }} | |
composer-options: '--ignore-platform-reqs' | |
- name: Test with Coverage | |
if: matrix.php == '8.1' && matrix.dependencies == 'locked' | |
run: | | |
make test-all-coverage | |
env: | |
TRANSLOADIT_KEY: ${{secrets.TEST_ACCOUNT_KEY}} | |
TRANSLOADIT_SECRET: ${{secrets.TEST_ACCOUNT_SECRET}} | |
TEST_NODE_PARITY: 1 | |
- name: Test without Coverage | |
if: matrix.php != '8.1' || matrix.dependencies != 'locked' | |
run: | | |
make test-all | |
env: | |
TRANSLOADIT_KEY: ${{secrets.TEST_ACCOUNT_KEY}} | |
TRANSLOADIT_SECRET: ${{secrets.TEST_ACCOUNT_SECRET}} | |
TEST_NODE_PARITY: 1 | |
- name: Publish Coverage Report | |
if: github.event_name == 'pull_request' && matrix.php == '8.1' && matrix.dependencies == 'locked' | |
uses: lucassabreu/[email protected] | |
with: | |
file: ./build/logs/clover.xml | |
with-table: true | |
with-chart: false |