-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (40 loc) · 1.86 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: run_as_root Quality Gate 🤓
on: [push]
jobs:
unit-tests:
name: "Unit Tests 🎉"
runs-on: ubuntu-latest
container:
image: 'registry.gitlab.com/run_as_root/quality_as_root/pipeline/magento2-community:2.3.4-php73'
credentials:
username: ${{ secrets.GITLAB_USERNAME }}
password: ${{ secrets.GITLAB_PASSWORD }}
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Setup Composer and Build Tools
run: |
composer install --prefer-dist --working-dir=./build/tools
composer --working-dir="/application" config minimum-stability dev
composer --working-dir="/application" config prefer-stable true
composer --working-dir="/application" config http-basic.repo.magento.com ${{ secrets.MAGENTO2_USERNAME }} ${{ secrets.MAGENTO2_PASSWORD }}
composer --working-dir="/application" require "run-as-root/magento2-prometheus-exporter":"$GITHUB_REF_NAME"
composer --working-dir="/application" dump-autoload
mkdir -p /application/reports/phpunit/
- name: Run Unit Tests
run: |
docker-php-ext-enable xdebug
cd /application
php ./vendor/bin/phpunit --log-junit ./reports/phpunit/junit.xml --coverage-clover ./reports/phpunit/clover.xml --coverage-html ./reports/phpunit/coverage-html --coverage-text --colors=never ./vendor/run_as_root/Test/Unit
codestyle:
name: "Code Style 🤡"
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Get Composer
uses: php-actions/composer@v5
- name: Install PHP CS
run: composer install --prefer-dist --working-dir=build/tools
- name: Run PHP Code Style
run: build/tools/vendor/bin/phpcs --standard=phpcs-ruleset.xml src/ --ignore-annotations