-
-
Notifications
You must be signed in to change notification settings - Fork 28
65 lines (53 loc) · 1.82 KB
/
main.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
name: tests
on:
push:
branches: [ 5.0.x ]
pull_request:
branches: [ 5.0.x ]
jobs:
code-climate:
runs-on: ubuntu-latest
name: Code Climate Tests Coverage
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: xdebug
extensions: bz2, curl, dom, gd, gmp, intl, igbinary, json, mbstring, opcache, redis, tokenizer, sqlite3, zip, xdebug
tools: composer:v2
- name: Download Code Climate Reporter
run: |
wget https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
chmod +x test-reporter-latest-linux-amd64
- name: Update dependencies
run: composer update --prefer-source
- name: Prepare Reporter
run: ./test-reporter-latest-linux-amd64 before-build
- name: Run Tests
run: ./vendor/bin/phpunit
- name: Send report to Code Climate
run: ./test-reporter-latest-linux-amd64 after-build -t clover -r ${{ secrets.CC_REPORTER_ID }}
codacy:
runs-on: ubuntu-latest
name: Codacy Tests Coverage
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: xdebug
extensions: bz2, curl, dom, gd, gmp, intl, igbinary, json, mbstring, opcache, redis, tokenizer, sqlite3, zip, xdebug
tools: composer:v2
- name: Update dependencies
run: composer update
- name: Run Unit Tests
run: ./vendor/bin/phpunit
- name: Run codacy-coverage-reporter
uses: codacy/codacy-coverage-reporter-action@master
with:
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }}