feat: add sonarcloud #2
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: ci | |
on: | |
pull_request: | |
types: [ opened, ready_for_review, reopened ] | |
jobs: | |
### | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- php-version: '8.1' | |
laravel-version: '9.*' | |
- php-version: '8.1' | |
laravel-version: '10.*' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
coverage: none | |
- run: composer validate | |
- name: require Laravel | |
run: composer require "laravel/framework:${{ matrix.laravel-version }}" --no-update | |
- name: install dependencies | |
run: composer update --prefer-dist --no-progress --no-suggest --no-interaction ${{ matrix.composer-flags }} | |
- run: composer test | |
sonarcloud: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Analyze with SonarCloud | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} |