-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (61 loc) · 1.97 KB
/
tests.yaml
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
70
71
72
73
74
75
76
name: Tests and linting
on:
push:
pull_request:
schedule:
- cron: '0 3 * * *'
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['7.3', '7.4', '8.0']
dependencies: ['']
include:
# Add lowest dependencies build for the lowest supported PHP version
- { php-versions: '7.3', dependencies: '--prefer-lowest' }
name: PHP ${{ matrix.php-versions }} ${{ matrix.dependencies }}
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, intl, zip
coverage: xdebug
- name: Install dependencies
run: composer update --no-interaction ${{ matrix.dependencies }}
- name: Run tests
run: ./vendor/bin/phpunit --colors=always --coverage-clover build/logs/clover.xml
# Disabled, as there is no executable code except constants in the library
# - name: Submit coverage to Coveralls
# env:
# COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# composer global require twinh/php-coveralls
# php-coveralls --coverage_clover=build/logs/clover.xml -v
codestyle:
name: "Code style and static analysis"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: mbstring, intl
- name: Install dependencies
run: composer update --no-interaction
- name: Lint
run: composer lint
- name: Run checks
run: composer analyze
markdown-link-check:
name: "Markdown link check"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: gaurav-nelson/github-action-markdown-link-check@v1
with:
use-verbose-mode: 'yes'
config-file: '.github/mlc_config.json'