This repository has been archived by the owner on Dec 4, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
64 lines (62 loc) · 1.94 KB
/
workflows.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
name: Drupal Entity Traits
on: [push]
jobs:
code-style:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: "shivammathur/setup-php@v2"
with:
php-version: "8.0"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install dependencies"
uses: "ramsey/composer-install@v1"
- name: "Run PHP CS Fixer"
run: |
./vendor/bin/php-cs-fixer --allow-risky=yes --dry-run fix
static-analysis:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: "shivammathur/setup-php@v2"
with:
php-version: "8.0"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
- name: "Run PHPStan"
run: |
./vendor/bin/phpstan analyse --no-progress
tests:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['8.0']
dependency-versions: ['highest', 'lowest']
steps:
- uses: actions/checkout@v2
- uses: "shivammathur/setup-php@v2"
with:
php-version: ${{ matrix.php-versions }}
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup problem matchers for PHP
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
- name: Setup problem matchers for PHPUnit
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
with:
dependency-versions: ${{ matrix.dependency-versions }}
- name: "Prepare for tests"
run: "mkdir -p build/logs"
- name: "Run tests"
run: |
./vendor/bin/phpunit
- name: "Publish coverage report to Codecov"
uses: "codecov/codecov-action@v1"
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: build/logs/clover.xml