-
Notifications
You must be signed in to change notification settings - Fork 0
70 lines (59 loc) · 1.78 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
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
name: Tests
on:
pull_request:
paths:
- .github/workflows/tests.yml
- app/**
- public/**
- src/**
- testFile/**
- tests/**
- .coveralls.yml
- composer.*
- phpcs.xml
- phpstan.neon.dist
- phpunit.xml
jobs:
tests:
name: Tests PHP ${{ matrix.php }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2]
experimental: [false]
include:
- php: 8.2
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
coverage: xdebug
- name: Set up MeCab
run: |
sudo apt-get update
sudo apt-get install -y mecab libmecab-dev mecab-ipadic-utf8
- name: Check MeCab
run: |
mecab --version
which mecab
- name: cache vendor
id: cache
uses: actions/cache@v4
with:
path: ./vendor
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-
- name: composer install
if: steps.cache.outputs.cache-hit != 'true'
run: docker-compose up composer
- name: Coding standards
run: vendor/bin/phpcs
- name: Static analysis
run: vendor/bin/phpstan
- name: Tests
run: vendor/bin/phpunit --coverage-clover clover.xml