Skip to content

Commit 9c04008

Browse files
committed
refactor: streamline payment method initialization and enhance error handling
- Consolidate initialization logic for PayPal and Bizum components to reduce code duplication. - Implement null checks and error logging for hidden input elements across all payment methods to prevent exceptions during order processing. - Improve maintainability by following a consistent pattern for instance creation and error handling.
1 parent 33371d3 commit 9c04008

File tree

1 file changed

+58
-0
lines changed

1 file changed

+58
-0
lines changed

.github/workflows/code-quality.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Code Quality
2+
on: [push]
3+
4+
# Concurrency to prevent multiple jobs from running at the same time
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
code-quality:
11+
name: Code Quality Checks
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '7.4'
22+
coverage: none
23+
tools: composer
24+
25+
- name: Install Composer dependencies
26+
uses: ramsey/composer-install@v3
27+
with:
28+
composer-options: --dev --optimize-autoloader
29+
30+
- name: Setup Node.js
31+
uses: actions/setup-node@v4
32+
with:
33+
node-version-file: .nvmrc
34+
cache: yarn
35+
36+
- name: Enable Corepack
37+
run: corepack enable
38+
39+
- name: Install dependencies
40+
run: yarn install --immutable
41+
42+
- name: Check code formatting
43+
run: yarn format:check
44+
45+
- name: Lint JavaScript
46+
run: yarn lint:js
47+
48+
- name: Lint CSS
49+
run: yarn lint:css
50+
51+
- name: Lint PHP (PHPCS)
52+
run: yarn lint:php:phpcs
53+
54+
- name: Lint PHP (PHPStan)
55+
run: yarn lint:php:phpstan
56+
57+
- name: Build assets
58+
run: yarn build

0 commit comments

Comments
 (0)