mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2024-11-26 02:40:43 -06:00
77 lines
1.8 KiB
YAML
77 lines
1.8 KiB
YAML
name: 'Code - Run Sonarcloud'
|
|
on:
|
|
pull_request:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
- develop
|
|
env:
|
|
DB_CONNECTION: sqlite
|
|
APP_KEY: UfpBqqeXx7zpNodsC6yjYQcRfDdm4Bxh
|
|
jobs:
|
|
sonarcloud:
|
|
name: SonarCloud
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- name: Setup PHP with Xdebug
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.3'
|
|
coverage: xdebug
|
|
extensions: >-
|
|
bcmath
|
|
curl
|
|
fileinfo
|
|
iconv
|
|
intl
|
|
json
|
|
sqlite3
|
|
mbstring
|
|
openssl
|
|
pdo
|
|
session
|
|
simplexml
|
|
sodium
|
|
tokenizer
|
|
xml
|
|
xmlwriter
|
|
|
|
- name: Copy standard configuration
|
|
run: cp .env.testing .env
|
|
|
|
- name: Install Composer dependencies
|
|
run: composer install --prefer-dist --no-interaction --no-progress --no-scripts
|
|
|
|
- name: PHPStan
|
|
run: .ci/phpstan.sh
|
|
|
|
- name: PHPMD
|
|
run: .ci/phpmd.sh
|
|
|
|
- name: PHP CS Fixer
|
|
run: .ci/phpcs.sh
|
|
|
|
- name: "Create database file"
|
|
run: touch storage/database/database.sqlite
|
|
|
|
- name: "Upgrades the database to the latest version"
|
|
run: php artisan firefly-iii:upgrade-database
|
|
|
|
- name: "Integrity Database Report"
|
|
run: php artisan firefly-iii:report-integrity
|
|
|
|
- name: "Run tests with coverage"
|
|
run: composer coverage
|
|
|
|
- name: Fix code coverage paths
|
|
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml
|
|
|
|
- name: SonarCloud Scan
|
|
uses: SonarSource/sonarcloud-github-action@master
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GH_ACTIONS_PERSONAL_ACCESS_TOKEN }}
|
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|