Skip to content
Merged

Mago #68

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
2 changes: 1 addition & 1 deletion .crontab
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# | |_______ hour (0-23)
# |_________ minute (0-59)
MAILTO=bugs@sumocoders.be
*/2 * * * * php8.5 ~/wwwroot/current/bin/console messenger:consume async --time-limit=110 --quiet
*/2 * * * * php8.5 ~/wwwroot/current/bin/console messenger:consume async --time-limit=110 --env=prod --quiet
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
Expand Up @@ -58,4 +58,5 @@ MAILER_DEFAULT_TO_EMAIL="mailer_default_to_email_is_misconfigured@tesuta.be"
###> sumocoders/framework-core-bundle ###
SITE_TITLE="Your application"
ENCRYPTION_KEY="8ea13de9680e2a1441774ec26642fa65a56d8099f44a301f219864b51bbaa925"
DEFAULT_URI="/"
###< sumocoders/framework-core-bundle ###
2 changes: 1 addition & 1 deletion .env.test
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
KERNEL_CLASS='App\Kernel'
APP_SECRET='$ecretf0rt3st'
SYMFONY_DEPRECATIONS_HELPER=999999
DATABASE_URL="mysql://root:root@127.0.0.1:3306/ci?serverVersion=5.7"
DATABASE_URL="mysql://root:root@127.0.0.1:3306/ci?serverVersion=8.0"
MAILER_DSN=null://default
133 changes: 133 additions & 0 deletions .github/workflows/code-quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
name: Code quality

on:
push:
branches: [master]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
install:
uses: ./.github/workflows/install.yml

mago-fmt:
name: Mago - check code styling
needs: install
runs-on: ubuntu-latest
container: ghcr.io/carthage-software/mago:1
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- name: Check formatting
run: mago --config=./mago.dist.toml --colors=always fmt --check
- name: Show formatting diff
if: failure()
run: mago --config=./mago.dist.toml --colors=always fmt --dry-run

mago-lint:
name: Mago - lint
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: ghcr.io/carthage-software/mago:1
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: mago --config=./mago.dist.toml --colors=always lint --reporting-format=rich --minimum-fail-level=warning

mago-analyse:
name: Mago - analyse
needs: install
runs-on: ubuntu-latest
container: ghcr.io/carthage-software/mago:1
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: mago --config=./mago.dist.toml --colors=always analyse --reporting-format=rich --minimum-fail-level=warning

mago-guard:
name: Mago - guard
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: ghcr.io/carthage-software/mago:1
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: mago --config=./mago.dist.toml --colors=always guard --reporting-format=rich --minimum-fail-level=warning

phpcs:
name: PHP_CodeSniffer - check code styling
needs: install
runs-on: ubuntu-latest
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: php vendor/bin/phpcs --colors --report-full -s

phpstan:
name: PHPStan - check for bugs
needs: install
runs-on: ubuntu-latest
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: php bin/console cache:warmup --env=dev
- run: php vendor/bin/phpstan analyse --memory-limit=-1 --no-progress --no-interaction

twig-cs-fixer:
name: Twig-CS-Fixer - check code styling
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: php vendor/bin/twig-cs-fixer --no-interaction lint templates/

stylelint:
name: Stylelint - check code styling
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: sumocoders/stylelint:latest
steps:
- uses: actions/checkout@v4
- run: stylelint --color .

standardjs:
name: StandardJS - check code styling
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: sumocoders/standardjs:latest
steps:
- uses: actions/checkout@v4
- run: standard .
42 changes: 42 additions & 0 deletions .github/workflows/dependency-scanning.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Dependency scanning

on:
push:
branches: [master]
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
install:
uses: ./.github/workflows/install.yml

composer-audit:
name: PHP packages - composer audit
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: composer audit --ansi --no-interaction

composer-outdated:
name: PHP packages - composer outdated
needs: install
runs-on: ubuntu-latest
continue-on-error: true
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: vendor
path: vendor
- run: composer outdated --ansi --no-interaction --strict
25 changes: 25 additions & 0 deletions .github/workflows/install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Install

on:
workflow_call:

jobs:
install:
name: Install dependencies and build assets
runs-on: ubuntu-latest
container: sumocoders/cli-tools-php85:latest
steps:
- uses: actions/checkout@v4
- id: composer-cache
uses: actions/cache@v4
with:
path: vendor
key: composer-${{ hashFiles('composer.lock') }}
- name: Install composer dependencies
if: steps.composer-cache.outputs.cache-hit != 'true'
run: COMPOSER_MEMORY_LIMIT=-1 composer install --no-scripts --no-progress
- uses: actions/upload-artifact@v4
with:
name: vendor
path: vendor
retention-days: 1
Loading
Loading