-
Notifications
You must be signed in to change notification settings - Fork 1
144 lines (123 loc) · 3.87 KB
/
0.checks-adminator3.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: checks-A3
on:
push:
branches:
- master
pull_request:
defaults:
run:
working-directory: ./adminator3
permissions:
pull-requests: write
checks: write
jobs:
basic-checks:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
php-versions: ['8.2']
name: Test on ${{ matrix.os }} with PHP ${{ matrix.php-versions }}
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
coverage: none
extensions: opentelemetry, grpc, protobuf
- name: Print PHP version and extensions
run: |
php -v \
&& php --ri opentelemetry \
&& php --ri grpc \
&& php --ri protobuf
# - name: Cache Composer dependencies
# uses: actions/cache@v3
# with:
# path: ./vendor
# key: composer-${{ runner.os }}-${{ hashFiles('**/composer.lock') }}
- name: Install dependencies
run: composer install --ignore-platform-reqs
# - name: PHP CodeSniffer
# id: phpcs
# continue-on-error: true
# run: |
# composer \
# run \
# phpcs \
# -- \
# --standard=PSR12 \
# app \
# boostrap \
# print \
# rss
# - uses: mainmatter/continue-on-error-comment@v1
# with:
# repo-token: ${{ secrets.GITHUB_TOKEN }}
# outcome: ${{ steps.phpcs.outcome }}
# test-id: Step Php-CS Failed on OS ${{ matrix.os }} and PHP ${{ matrix.php-versions }}
# - name: PHP CodeSniffer Fix
# run: |
# composer \
# run \
# phpcbf \
# -- \
# --standard=PSR12 \
# boostrap \
# config \
# resources \
# templates \
# app
- name: PHP-CS-Fixer
run: |
php \
vendor/friendsofphp/php-cs-fixer/php-cs-fixer \
check \
--show-progress=dots \
-v
- name: phpstan
if: always()
run: |
cd ../ && \
make \
run-a3-phpstan
- name: Run the tests
if: always()
run: composer run test
# - name: check junit report
# if: always()
# run: ls -lh build
# - uses: actions/setup-node@v4
# with:
# node-version: '20'
- name: JUnit Report Action
if: always()
uses: mikepenz/action-junit-report@v4
with:
check_name: "JUnit Test Report :: OS: ${{ matrix.os }} :: PHP: ${{ matrix.php-versions }}"
include_passed: true
detailed_summary: true
check_title_template: '{{SUITE_NAME}} | {{TEST_NAME}}'
report_paths: 'adminator3/build/report.*.xml'
- name: Publish Test Results
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
check_name: "Test Results :: OS: ${{ matrix.os }} :: PHP: ${{ matrix.php-versions }}"
comment_mode: off
files: |
adminator3/build/report.*.xml
- uses: actions/upload-artifact@v4
with:
name: "phpunit-junit-adminator3-os-${{ matrix.os }}-php-${{ matrix.php-versions }}-report"
path: adminator3/build/report.*.xml
compression-level: 0
# - name: Test Report
# uses: dorny/test-reporter@v1
# if: success() || failure() # run this step even if previous step failed
# with:
# name: PHPUnit Tests # Name of the check run which will be created
# path: adminator3/build/report.*.xml # Path to test results
# reporter: java-junit # Format of test results