Skip to content

Commit bb62a64

Browse files
committed
Fix GitHub Action.
1 parent 3705ef0 commit bb62a64

12 files changed

+132
-205
lines changed

.github/workflows/ci-code-style.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-markdown-lint.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/ci-mutant-test.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-phpstan.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-psalm.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/ci-test.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Test
2+
3+
on:
4+
- push
5+
- pull_request
6+
7+
jobs:
8+
9+
yml-lint:
10+
runs-on: ubuntu-latest
11+
name: 'YML lint'
12+
timeout-minutes: 3
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: docker pull cytopia/yamllint
16+
- run: docker run --rm -t -v $(pwd):/data cytopia/yamllint --config-file=tests/.yamllint .
17+
18+
markdown-lint:
19+
runs-on: ubuntu-latest
20+
name: 'Markdown lint'
21+
timeout-minutes: 3
22+
steps:
23+
- uses: actions/checkout@v4
24+
- run: docker pull tmknom/markdownlint
25+
- run: docker run --rm -v $(pwd):/work tmknom/markdownlint '**/*.md' --config tests/.markdownlintrc --ignore vendor --ignore CHANGELOG.md --ignore var --ignore tmp
26+
27+
cs-lint:
28+
runs-on: ubuntu-latest
29+
name: 'CS Lint'
30+
timeout-minutes: 5
31+
steps:
32+
- uses: actions/checkout@v4
33+
- uses: shivammathur/setup-php@v2
34+
with:
35+
php-version: '8.4'
36+
tools: composer:v2
37+
- run: composer install --dev --ignore-platform-req=php --quiet
38+
shell: bash
39+
- run: PHP_CS_FIXER_IGNORE_ENV=1 composer cs:list
40+
shell: bash
41+
42+
psalm:
43+
runs-on: ubuntu-latest
44+
name: 'Psalm'
45+
timeout-minutes: 5
46+
steps:
47+
- uses: actions/checkout@v4
48+
- uses: shivammathur/setup-php@v2
49+
with:
50+
php-version: '8.4'
51+
tools: composer:v2
52+
- run: composer install --ignore-platform-req=php --quiet
53+
shell: bash
54+
- run: composer psalm
55+
shell: bash
56+
57+
phpstan:
58+
runs-on: ubuntu-latest
59+
name: 'Phpstan'
60+
timeout-minutes: 5
61+
steps:
62+
- uses: actions/checkout@v4
63+
- uses: shivammathur/setup-php@v2
64+
with:
65+
php-version: '8.4'
66+
tools: composer:v2
67+
- run: composer install --ignore-platform-req=php --quiet
68+
shell: bash
69+
- run: composer phpstan
70+
shell: bash
71+
72+
test-unit:
73+
runs-on: ubuntu-latest
74+
name: "Running unit tests for PHP ${{ matrix.php-version }}"
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
php-version: ['8.2', '8.3', '8.4']
79+
timeout-minutes: 5
80+
steps:
81+
- uses: actions/checkout@v4
82+
- uses: shivammathur/setup-php@v2
83+
with:
84+
php-version: ${{ matrix.php-version }}
85+
tools: composer:v2
86+
- run: composer install --ignore-platform-req=php --quiet
87+
shell: bash
88+
- run: composer test
89+
shell: bash
90+
91+
test-unit-coverage:
92+
runs-on: ubuntu-latest
93+
name: "Running unit test coverage"
94+
timeout-minutes: 5
95+
needs:
96+
- test-unit
97+
steps:
98+
- uses: actions/checkout@v4
99+
- uses: shivammathur/setup-php@v2
100+
with:
101+
php-version: '8.4'
102+
tools: composer:v2
103+
- run: composer install --ignore-platform-req=php --quiet
104+
shell: bash
105+
- run: composer test:coverage:xml
106+
shell: bash
107+
- uses: paambaati/[email protected]
108+
env:
109+
CC_TEST_REPORTER_ID: 203d856fbc3ebebe66cc94cccde4429973298c7fb919df64a1557850cc9c8345
110+
with:
111+
coverageLocations: coverage.xml:clover
112+
- uses: actions/upload-artifact@v4
113+
with:
114+
name: coverage.xml
115+
path: coverage.xml
116+
117+
test-mutant:
118+
runs-on: ubuntu-latest
119+
name: 'Mutant Test'
120+
timeout-minutes: 5
121+
continue-on-error: true
122+
steps:
123+
- uses: actions/checkout@v4
124+
- uses: shivammathur/setup-php@v2
125+
with:
126+
php-version: '8.4'
127+
tools: composer:v2
128+
- run: composer install --ignore-platform-req=php --quiet
129+
shell: bash
130+
- run: composer test:mutant
131+
shell: bash

.github/workflows/ci-unit-test-coverage.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.

.github/workflows/ci-unit-test.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/ci-yml-lint.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
"benchmark": "vendor/bin/phpbench run --report=aggregate --progress dots",
5555
"benchmark:csv": "vendor/bin/phpbench run --report=bare --output=csv-file",
5656
"benchmark:plot": "python benchmark/plot/plot.py",
57-
"yml:lint": "docker run --rm -it -v $(pwd):/data cytopia/yamllint .",
57+
"yml:lint": "docker run --rm -it -v $(pwd):/data cytopia/yamllint --config-file=tests/.yamllint .",
5858
"markdown:lint": "docker run --rm -v $(pwd):/work tmknom/markdownlint '**/*.md' --ignore vendor",
5959
"docs:serve": "docker run --rm -d -p 3000:3000 -v $(pwd)/docs:/docs sujaykumarh/docsify serve"
6060
},

0 commit comments

Comments
 (0)