mirror of
https://github.com/Karaka-Management/oms-Admin.git
synced 2026-02-15 03:58:41 +00:00
draft individual module test environments
This commit is contained in:
parent
d143261c22
commit
49d84f4477
58
.github/workflows/main.yml
vendored
58
.github/workflows/main.yml
vendored
|
|
@ -41,6 +41,34 @@ jobs:
|
||||||
code-tests:
|
code-tests:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: "!contains(github.event.head_commit.message, 'NO_CI')"
|
if: "!contains(github.event.head_commit.message, 'NO_CI')"
|
||||||
|
services:
|
||||||
|
mysql:
|
||||||
|
image: mysql:5.7
|
||||||
|
env:
|
||||||
|
MYSQL_ALLOW_EMPTY_PASSWORD: false
|
||||||
|
MYSQL_ROOT_PASSWORD: root
|
||||||
|
MYSQL_DATABASE: oms
|
||||||
|
ports:
|
||||||
|
- 3306:3306
|
||||||
|
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||||
|
postgres:
|
||||||
|
image: postgres:10.8
|
||||||
|
env:
|
||||||
|
POSTGRES_USER: postgres
|
||||||
|
POSTGRES_PASSWORD: root
|
||||||
|
POSTGRES_DB: oms
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 3
|
||||||
|
redis:
|
||||||
|
image: redis
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
options: --entrypoint redis-server
|
||||||
|
memcached:
|
||||||
|
image: memcached
|
||||||
|
ports:
|
||||||
|
- 11211:11211
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 3
|
max-parallel: 3
|
||||||
|
|
@ -58,12 +86,34 @@ jobs:
|
||||||
ref: develop
|
ref: develop
|
||||||
repository: Orange-Management/Build
|
repository: Orange-Management/Build
|
||||||
path: Build
|
path: Build
|
||||||
|
- name: Checkout Resource Repository
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: develop
|
||||||
|
repository: Orange-Management/Resources
|
||||||
|
path: Resources
|
||||||
|
- name: Checkout phpOMS Repository
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: develop
|
||||||
|
repository: Orange-Management/phpOMS
|
||||||
|
path: phpOMS
|
||||||
|
- name: Checkout Orange-Management Repository
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
fetch-depth: 1
|
||||||
|
ref: develop
|
||||||
|
repository: Orange-Management/Orange-Management
|
||||||
|
path: Orange-Management
|
||||||
- name: Setup PHP, with composer and extensions
|
- name: Setup PHP, with composer and extensions
|
||||||
uses: shivammathur/setup-php@master
|
uses: shivammathur/setup-php@master
|
||||||
with:
|
with:
|
||||||
php-version: ${{ matrix.php-versions }}
|
php-version: ${{ matrix.php-versions }}
|
||||||
extensions: mbstring, gd, zip, dom, mysql, pgsql, sqlite, imap, bcmath, redis, memcached
|
extensions: mbstring, gd, zip, dom, mysql, pgsql, sqlite, imap, bcmath, redis, memcached
|
||||||
ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1
|
ini-values: opcache.jit_buffer_size=256M, opcache.jit=1235, pcre.jit=1
|
||||||
|
coverage: pcov
|
||||||
- name: Get Composer Cache Directory
|
- name: Get Composer Cache Directory
|
||||||
id: composer-cache
|
id: composer-cache
|
||||||
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
@ -75,8 +125,12 @@ jobs:
|
||||||
restore-keys: ${{ runner.os }}-composer-
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
- name: Setup Composer
|
- name: Setup Composer
|
||||||
run: composer install
|
run: composer install
|
||||||
- name: phpcs
|
- name: phpunit
|
||||||
run: vendor/bin/phpcs ./ --standard="Build/Config/phpcs.xml" -s --report=full
|
run: vendor/bin/phpunit --coverage-clover tests/coverage.xml --configuration tests/phpunit_default.xml
|
||||||
|
- name: codecov
|
||||||
|
env:
|
||||||
|
CODECOV_TOKEN: "${{ secrets.CODECOV_TOKEN }}"
|
||||||
|
run: "bash <(curl -s https://codecov.io/bash) -f tests/coverage.xml"
|
||||||
custom:
|
custom:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: "!contains(github.event.head_commit.message, 'NO_CI')"
|
if: "!contains(github.event.head_commit.message, 'NO_CI')"
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ final class Autoloader
|
||||||
*/
|
*/
|
||||||
private static $paths = [
|
private static $paths = [
|
||||||
__DIR__ . '/../',
|
__DIR__ . '/../',
|
||||||
|
__DIR__ . '/../Orange-Management/',
|
||||||
__DIR__ . '/../../',
|
__DIR__ . '/../../',
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@
|
||||||
</report>
|
</report>
|
||||||
</coverage>
|
</coverage>
|
||||||
<testsuites>
|
<testsuites>
|
||||||
|
<testsuite name="Install">
|
||||||
|
<directory>../Orange-Management/Install/tests*</directory>
|
||||||
|
</testsuite>
|
||||||
<testsuite name="Module">
|
<testsuite name="Module">
|
||||||
<directory>../tests*</directory>
|
<directory>../tests*</directory>
|
||||||
</testsuite>
|
</testsuite>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user