Skip to content

ci: pin action SHAs and exclude tests from duplication analysis #24

ci: pin action SHAs and exclude tests from duplication analysis

ci: pin action SHAs and exclude tests from duplication analysis #24

Workflow file for this run

name: tests
on: [push, pull_request]
jobs:
pest:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- php: '8.2'
laravel: '10.*'
testbench: '8.*'
pest: '2.*'
pest-laravel: '2.*'
- php: '8.2'
laravel: '11.*'
testbench: '9.*'
pest: '2.*'
pest-laravel: '2.*'
- php: '8.2'
laravel: '12.*'
testbench: '10.*'
pest: '3.*'
pest-laravel: '3.*'
- php: '8.3'
laravel: '13.*'
testbench: '11.*'
pest: '4.*'
pest-laravel: '4.*'
- php: '8.4'
laravel: '13.*'
testbench: '11.*'
pest: '4.*'
pest-laravel: '4.*'
name: PHP ${{ matrix.php }} / Laravel ${{ matrix.laravel }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: ${{ matrix.php }}
coverage: none
- name: Install dependencies
run: |
composer require \
"illuminate/support:${{ matrix.laravel }}" \
"orchestra/testbench:${{ matrix.testbench }}" \
"pestphp/pest:${{ matrix.pest }}" \
"pestphp/pest-plugin-laravel:${{ matrix.pest-laravel }}" \
--no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Run tests
run: ./vendor/bin/pest
sonarcloud:
name: SonarCloud Analysis
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
with:
fetch-depth: 0
- name: Setup PHP
uses: shivammathur/setup-php@accd6127cb78bee3e8082180cb391013d204ef9f # v2
with:
php-version: '8.4'
coverage: xdebug
- name: Install dependencies
run: |
composer require \
"illuminate/support:13.*" \
"orchestra/testbench:11.*" \
"pestphp/pest:4.*" \
"pestphp/pest-plugin-laravel:4.*" \
--no-interaction --no-update
composer update --prefer-dist --no-interaction
- name: Run tests with coverage
run: ./vendor/bin/pest --coverage-clover=coverage.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@ffc3010689be73b8e5ae0c57ce35968afd7909e8 # v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}