Skip to content

v2.3.2

v2.3.2 #274

Workflow file for this run

name: Test
on:
push:
branches: ['*']
jobs:
test:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- php-version: '8.0'
db-image: mariadb
db-version: '10.5'
- php-version: '8.1'
db-image: mariadb
db-version: '10.11'
- php-version: '8.1'
db-image: mariadb
db-version: '11.0'
- php-version: '8.2'
db-image: mysql
db-version: '8.0.22'
- php-version: '8.2'
db-image: mysql
db-version: '8.0.34'
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@v3
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.0' }}
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.0' }}
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 SonarQube
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.0' }}
uses: warchant/setup-sonar-scanner@v3
- name: SonarQube
if: ${{ github.repository_owner == 'tkhamez' && matrix.php-version == '8.0' }}
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/