This repository has been archived by the owner on Dec 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (59 loc) · 1.97 KB
/
ci.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: ci
on:
pull_request:
push:
branches:
- "master"
jobs:
run:
runs-on: ${{ matrix.operating-system }}
strategy:
matrix:
operating-system: ['ubuntu-latest']
php-versions: ['7.4']
coveralls: [false]
include:
- operating-system: 'ubuntu-latest'
php-versions: '7.4'
coveralls: true
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Configure PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
tools: composer:v1
coverage: xdebug
- name: Install Composer dependencies
run: composer install
- name: Install Magerun
if: matrix.coveralls == false
run: |
wget https://files.magerun.net/n98-magerun2-latest.phar
mkdir -p ~/.n98-magerun2/modules
ln -s $(pwd) ~/.n98-magerun2/modules/magerun2-password-normalizer
php n98-magerun2-latest.phar help dev:customer:normalize-passwords
- name: Codesniffer
run: composer cs-check
- name: Static code analysis
run: composer analyze
- name: Unittests
if: matrix.coveralls == false
run: composer test
- name: Infection for added files
env:
INFECTION_BADGE_API_KEY: ${{ secrets.INFECTION_BADGE_API_KEY }}
run: |
git fetch --depth=1 origin $GITHUB_BASE_REF
./vendor/bin/infection -j4 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
- name: Unittests with coverage
if: matrix.coveralls == true
run: composer coverage
- name: Coveralls report
if: matrix.coveralls == true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
composer require php-coveralls/php-coveralls
./vendor/bin/php-coveralls --coverage_clover=clover.xml -v