Skip to content

Commit edb85fa

Browse files
committed
Updated workflow to only trigger on pr create and on push
1 parent 739965e commit edb85fa

1 file changed

Lines changed: 21 additions & 61 deletions

File tree

.github/workflows/code-quality.yml

Lines changed: 21 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,30 @@
11
name: Code Quality
22

33
on:
4+
push:
5+
branches: [main, master, beta, development, feature/**, bugfix/**, hotfix/**]
46
pull_request:
5-
branches: [main, master, development]
7+
types: [opened, reopened]
8+
branches: [main, master, beta, development]
9+
workflow_dispatch:
610

711
concurrency:
8-
group: quality-${{ github.head_ref || github.ref }}
12+
group: quality-${{ github.head_ref || github.ref_name }}
913
cancel-in-progress: true
1014

1115
jobs:
12-
php-checks:
13-
name: ${{ matrix.check.name }}
14-
runs-on: ubuntu-latest
15-
strategy:
16-
fail-fast: false
17-
matrix:
18-
check:
19-
- { name: "PHP Lint", command: "composer lint" }
20-
- { name: "PHPCS", command: "./vendor/bin/phpcs --standard=phpcs.xml" }
21-
- { name: "PHPMD", command: "./vendor/bin/phpmd lib text phpmd.xml" }
22-
- { name: "Psalm", command: "./vendor/bin/psalm --threads=1 --no-cache --output-format=github" }
23-
- { name: "PHPStan", command: "./vendor/bin/phpstan analyse --memory-limit=1G" }
24-
- { name: "PHPUnit", command: "./vendor/bin/phpunit --colors=always" }
25-
26-
steps:
27-
- name: Checkout
28-
uses: actions/checkout@v4
29-
30-
- name: Setup PHP
31-
uses: shivammathur/setup-php@v2
32-
with:
33-
php-version: '8.1'
34-
extensions: mbstring, xml, ctype, iconv, intl, dom, filter, gd, json, posix, zip, soap
35-
tools: composer:v2
36-
37-
- name: Cache Composer dependencies
38-
uses: actions/cache@v4
39-
with:
40-
path: vendor
41-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
42-
restore-keys: ${{ runner.os }}-composer-
43-
44-
- name: Install dependencies
45-
run: composer install --no-progress --prefer-dist --optimize-autoloader
46-
47-
- name: ${{ matrix.check.name }}
48-
run: ${{ matrix.check.command }}
49-
frontend-quality:
50-
name: Frontend Quality
51-
runs-on: ubuntu-latest
52-
53-
steps:
54-
- name: Checkout
55-
uses: actions/checkout@v4
56-
57-
- name: Setup Node.js
58-
uses: actions/setup-node@v4
59-
with:
60-
node-version: '20'
61-
cache: 'npm'
62-
63-
- name: Install dependencies
64-
run: npm ci
65-
66-
- name: ESLint
67-
run: npm run lint
68-
69-
- name: Stylelint
70-
run: npm run stylelint
16+
quality:
17+
if: github.event_name != 'push' || github.event.created != true
18+
uses: ConductionNL/.github/.github/workflows/quality.yml@main
19+
with:
20+
app-name: openconnector
21+
php-version: "8.3"
22+
php-test-versions: '["8.3", "8.4"]'
23+
nextcloud-test-refs: '["stable32"]'
24+
enable-psalm: true
25+
enable-phpstan: true
26+
enable-phpmetrics: true
27+
enable-frontend: true
28+
enable-eslint: true
29+
enable-phpunit: true
30+
enable-newman: false

0 commit comments

Comments
 (0)