Skip to content

Commit 6f3331c

Browse files
committed
+ workflows/be.yml
+ actions/be/action.yml @ .github
1 parent 44b9c8a commit 6f3331c

File tree

3 files changed

+82
-2
lines changed

3 files changed

+82
-2
lines changed

.github/actions/be/action.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: be/init
2+
description: be/init
3+
runs:
4+
using: composite
5+
steps:
6+
- uses: actions/checkout@v4
7+
with:
8+
submodules: true
9+
- uses: shivammathur/setup-php@v2
10+
with:
11+
php-version: '8.3'
12+
tools: composer cs2pr
13+
coverage: none
14+
ini-values: opcache.enable_cli=1
15+
env:
16+
update: 'true'
17+
- run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
18+
working-directory: be
19+
shell: bash
20+
- id: composer-cache
21+
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
22+
working-directory: be
23+
shell: bash
24+
- uses: actions/cache@v4
25+
with:
26+
path: ${{ steps.composer-cache.outputs.dir }}
27+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
28+
restore-keys: ${{ runner.os }}-composer-
29+
- run: composer install --prefer-dist
30+
working-directory: be
31+
shell: bash

.github/workflows/be.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: be
2+
on:
3+
push:
4+
#paths: [be/**]
5+
defaults:
6+
run:
7+
working-directory: be
8+
jobs:
9+
phpstan:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: ./.github/actions/be
14+
- run: ./vendor/bin/phpstan analyse
15+
psalm:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
- uses: ./.github/actions/be
20+
- run: ./vendor/bin/psalm --output-format=github
21+
phpcs:
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v4
25+
- uses: ./.github/actions/be
26+
- id: run
27+
run: ./vendor/bin/phpcs --report-full --report-checkstyle=./phpcs-report.xml
28+
- if: always() && steps.run.outcome == 'failure'
29+
run: cs2pr ./phpcs-report.xml
30+
pint:
31+
runs-on: ubuntu-latest
32+
steps:
33+
- uses: actions/checkout@v4
34+
- uses: ./.github/actions/be
35+
- id: run
36+
run: ./vendor/bin/pint --test
37+
- if: failure() && steps.run.outcome != 'success'
38+
run: ./vendor/bin/pint --test --format=checkstyle | cs2pr
39+
php-cs-fixer:
40+
runs-on: ubuntu-latest
41+
steps:
42+
- uses: actions/checkout@v4
43+
- uses: ./.github/actions/be
44+
- run: ./vendor/bin/php-cs-fixer fix --dry-run --format=checkstyle | cs2pr
45+
phpmd:
46+
runs-on: ubuntu-latest
47+
steps:
48+
- uses: actions/checkout@v4
49+
- uses: ./.github/actions/be
50+
- run: ./vendor/bin/phpmd . github

.github/workflows/c#.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,4 @@ jobs:
1414
steps:
1515
- uses: actions/checkout@v4
1616
- uses: ./.github/actions/c#
17-
- name: build
18-
run: dotnet build --no-restore -c Debug ${{ matrix.project }}
17+
- run: dotnet build --no-restore -c Debug ${{ matrix.project }}

0 commit comments

Comments
 (0)