Skip to content

Remove command from docu that does no longer exist. #313

Remove command from docu that does no longer exist.

Remove command from docu that does no longer exist. #313

Workflow file for this run

name: Test
on:
push:
branches: ['*']
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- php-version: '8.1'
db-image: mariadb
db-version: '10.5'
- php-version: '8.1'
db-image: mariadb
db-version: '10.11'
- php-version: '8.2'
db-image: mariadb
db-version: '11.4'
- php-version: '8.3'
db-image: mysql
db-version: '8.0.22'
- php-version: '8.3'
db-image: mysql
db-version: '8.4.0'
fail-fast: false
services:
database:
image: ${{ matrix.db-image }}:${{ matrix.db-version }}
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: test
ports: ['3306:3306']
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-version }}
extensions: gmp, xdebug, apcu
ini-values: apc.enable_cli=1
tools: composer:v2
- name: Install
run: cd backend && composer install
- name: Test with code coverage
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.2' }}
env:
NEUCORE_APP_ENV: dev
NEUCORE_TEST_DATABASE_URL: 'mysql://root:@127.0.0.1/test'
NEUCORE_EVE_CLIENT_ID: '123'
NEUCORE_EVE_SECRET_KEY: 'abc'
NEUCORE_EVE_CALLBACK_URL: 'http://localhost'
run: cd backend && vendor/bin/phpunit --coverage-clover var/logs/clover.xml
- name: Test
if: ${{ github.repository_owner != 'tkhamez' || matrix.php-version != '8.2' }}
env:
NEUCORE_APP_ENV: dev
NEUCORE_TEST_DATABASE_URL: 'mysql://root:@127.0.0.1/test'
NEUCORE_EVE_CLIENT_ID: '123'
NEUCORE_EVE_SECRET_KEY: 'abc'
NEUCORE_EVE_CALLBACK_URL: 'http://localhost'
run: cd backend && vendor/bin/phpunit
- name: Setup Java
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.2' }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 17
- name: Setup SonarQube
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.2' }}
uses: warchant/setup-sonar-scanner@v7
- name: SonarQube Scan
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.2' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: sonar-scanner
-Dsonar.token=${{ secrets.SONAR_TOKEN }}
-Dsonar.projectKey=tkhamez_neucore
-Dsonar.organization=tkhamez
-Dsonar.sources=backend/src,frontend/src
-Dsonar.tests=backend/tests
-Dsonar.php.coverage.reportPaths=backend/var/logs/clover.xml
-Dsonar.coverage.exclusions=backend/src/Migrations/*,frontend/src/**
-Dsonar.cpd.exclusions=backend/src/Migrations/*
-Dsonar.host.url=https://sonarcloud.io/