Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
97 changes: 97 additions & 0 deletions .github/workflows/code-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
##################################################################################
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
#
##################################################################################

name: "Static Analysis"

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
- "dev"

jobs:
analyze_sources:
name: "Check if there any source code to work on?"
runs-on: ubuntu-latest

outputs:
# Export 'filter' step check result so next step can use it.
run_action: ${{ steps.filter.outputs.src }}
# These are source files matching our filter that are affected by the PR.
changed_files: ${{ steps.filter.outputs.src_files }}

steps:
# https://github.com/marketplace/actions/checkout
- name: "Checkout sources"
uses: actions/checkout@v4

# https://github.com/marketplace/actions/paths-changes-filter
- name: "Look for changes that matters for us…"
uses: dorny/paths-filter@v3
id: filter
with:
# Token is optional for public repos, but required for private repos
token: ${{ secrets.GITHUB_TOKEN }}
list-files: 'escape'
filters: |
src:
- 'src/**/*.php'
- 'tests/**/*.php'

- name: "Will action step be run?"
run: |
found="NO"
[[ ${{ steps.filter.outputs.src }} == 'true' ]] && found="YES"
echo "run_action=${found}" >> $GITHUB_OUTPUT
echo -e "\n****************************************\n"
echo "${found}"
echo -e "****************************************"

check:
name: "Run tools…"
# Will run only if analyze_sources determined it is needed.
needs: analyze_sources
if: needs.analyze_sources.outputs.run_action == 'true'

strategy:
# do not stop the workflow if single run failed
fail-fast: false
matrix:
# Quotes are needed it is treated as a number and zero at decimal part is gone
# at runtime i.e. 8.10 -> 8.1, while "8.10" => "8.10".
php: ["8.1"]

runs-on: ubuntu-latest

steps:
# https://github.com/marketplace/actions/setup-php-action
- name: "Setup PHP ${{ matrix.php }}"
uses: shivammathur/setup-php@v2
with:
php-version: "${{ matrix.php }}"
ini-values: |
memory_limit=512M


# https://github.com/marketplace/actions/checkout
- name: "Checkout repository…"
uses: actions/checkout@v4

# https://github.com/marketplace/actions/composer-php-actions
- name: "Installing dependencies…"
uses: php-actions/composer@v6
with:
version: 2
php_version: "${{ matrix.php }}"
dev: yes
memory_limit: 512M

- name: "Running linters…"
shell: bash
run: composer lint
79 changes: 79 additions & 0 deletions .github/workflows/css-lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
##################################################################################
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
#
##################################################################################

name: "CSS Lint"

on:
push:
branches:
- "master"
pull_request:
branches:
- "master"
- "dev"

jobs:
analyze_sources:
name: "Check if there any CSS code to work on?"
runs-on: ubuntu-latest

outputs:
# Export 'filter' step check result so next step can use it.
run_action: ${{ steps.filter.outputs.src }}
# These are source files matching our filter that are affected by the PR.
changed_files: ${{ steps.filter.outputs.src_files }}

steps:
# https://github.com/marketplace/actions/checkout
- name: "Checkout sources"
uses: actions/checkout@v4

# https://github.com/marketplace/actions/paths-changes-filter
- name: "Look for changes that matters for us…"
uses: dorny/paths-filter@v3
id: filter
with:
# Token is optional for public repos, but required for private repos
token: ${{ secrets.GITHUB_TOKEN }}
list-files: 'escape'
filters: |
src:
- 'Resources/public/*.css'

- name: "Will action step be run?"
run: |
found="NO"
[[ ${{ steps.filter.outputs.src }} == 'true' ]] && found="YES"
echo "run_action=${found}" >> $GITHUB_OUTPUT
echo -e "\n****************************************\n"
echo "${found}"
echo -e "****************************************"

check:
name: "Run tools…"
# Will run only if analyze_sources determined it is needed.
needs: analyze_sources
if: needs.analyze_sources.outputs.run_action == 'true'

runs-on: ubuntu-latest

steps:
# https://github.com/marketplace/actions/checkout
- name: "Checkout repository…"
uses: actions/checkout@v4

# https://github.com/marketplace/actions/setup-node
- name: "Setup Node.js"
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'

- name: "Installing dependencies…"
run: npm install

- name: "Running Stylelint…"
run: npx stylelint "Resources/public/*.css"
76 changes: 76 additions & 0 deletions .github/workflows/markdown.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
##################################################################################
#
# @author Marcin Orlowski <mail (#) marcinOrlowski (.) com>
#
##################################################################################
#
# Runs markdownlint on all *.md files
#

name: "Markdown Lint"

on:
push:
branches: [ master ]
pull_request:
branches: [ master, dev ]

jobs:
analyze_sources:
name: "Check if there any source code to work on?"
runs-on: ubuntu-latest

outputs:
# Export 'filter' step check result so next step can use it.
run_action: ${{ steps.filter.outputs.src }}
# These are source files matching our filter that are affected by the PR.
changed_files: ${{ steps.filter.outputs.src_files }}

steps:
# https://github.com/marketplace/actions/checkout
- name: "Checkout sources"
uses: actions/checkout@v4

# https://github.com/marketplace/actions/paths-changes-filter
- name: "Look for changes that matters for us..."
uses: dorny/paths-filter@v3
id: filter
with:
# Token is optional for public repos, but required for private repos
token: ${{ secrets.GITHUB_TOKEN }}
list-files: 'escape'
filters: |
src:
- 'docs/*.md'
- 'project/*.md'
- 'README.md'

- name: "Will action step be run?"
run: |
found="NO"
[[ ${{ steps.filter.outputs.src }} == 'true' ]] && found="YES"
echo "run_action=${found}" >> $GITHUB_OUTPUT
echo -e "\n****************************************\n"
echo "${found}"
echo -e "****************************************"


mdlint:
name: "Run tools…"
# Will run only if analyze_sources determined it is needed.
needs: analyze_sources
if: needs.analyze_sources.outputs.run_action == 'true'

runs-on: ubuntu-latest

steps:
# https://github.com/marketplace/actions/checkout
- name: "Checkout repository..."
uses: actions/checkout@v4

# https://github.com/marketplace/actions/my-markdown-linter
- name: "Running markdown linter..."
uses: ruzickap/action-my-markdown-linter@v1
with:
exclude: vendor
config_file: .markdownlint.yaml
64 changes: 64 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# we need that to prevent commiting changes to these
# files from worktree environent
/.claude/settings.local.json

# IDE
/.idea

# TMP files
*.bak
*~
*.swp
*.kate-swp
*.tmp

/product_group_translations*.json

/resetdb.sh

###> symfony/framework-bundle ###
/.env.local
/.env.local.php
/.env.*.local
/mockup
/config/secrets/prod/prod.decrypt.private.php
/public/bundles/
/var/
/vendor/
###< symfony/framework-bundle ###

###> phpunit/phpunit ###
/phpunit.xml
.phpunit.result.cache
###< phpunit/phpunit ###

###> symfony/phpunit-bridge ###
.phpunit.result.cache
/phpunit.xml
###< symfony/phpunit-bridge ###

**/.claude/settings.local.json

# Worktree configuration
.worktree-config.yaml

###> squizlabs/php_codesniffer ###
/.phpcs-cache
###< squizlabs/php_codesniffer ###
node_modules/
.npm/
.cache/

.viminfo

# these can be modified when you shell into container
.bashrc
.bash_history
.viminfo
.mariadb_history

# Files created in the folder by container tools like `mc`
.config
.local

composer.lock
Loading