Skip to content

Merge branch 'development' into master #35

Merge branch 'development' into master

Merge branch 'development' into master #35

name: PHP Build QA and Test
on:
push:
branches: [ "master", "development" ]
pull_request:
branches: [ "master" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@2cb9b829437ee246e9b3cac53555a39208ca6d28
with:
php-version: '8.3'
- uses: actions/checkout@v3
- name: Copy .env.test.local
run: php -r "file_exists('.env.test.local') || copy('.env.test', '.env.test.local');"
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.test', '.env');"
## —— Composer ———————————————————————————————————————————————————————————
- name: Validate composer.json and composer.lock
run: composer validate --strict
- name: Cache Composer packages
id: composer-cache
uses: actions/cache@v3
with:
path: vendor
key: ${{ runner.os }}-php-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-php-
- name: Install dependencies
run: composer install --prefer-dist --no-progress
## —— Database & cache ——————————————————————————————————————————————————
- name: Create Database
run: |
touch var/data.db
- name: Create cache directory
run: |
chmod 777 ./bin/console
mkdir -p var/cache
chmod 777 var/cache
./bin/console cache:clear
## —— PHP QA ———————————————————————————————————————————————————————————
- name: QA CS
run: ./vendor/bin/php-cs-fixer check
- name: QA STAN
run: ./vendor/bin/phpstan analyse -c phpstan.neon application
- name: QA Lint Container
run: ./bin/console lint:container
- name: QA Lint Twig
run: ./bin/console lint:twig
- name: QA PSALM
run: ./vendor/bin/psalm
## —— Backend Tests ———————————————————————————————————————————————————
- name: Execute tests (Unit & Integration Tests) via PestPHP
run: ./vendor/bin/pest
## —— Yarn ————————————————————————————————————————————————————————————
- name: Nodejs install
uses: actions/setup-node@v2
with:
node-version: '21'
- run: yarn install
- name: Yarn build
run: yarn run encore production
## —— Frontend MemberModule ——————————————————————————————————————————
- name: Build Member Module Application
run: |
cd frontends/member_module/
npm install
npm run build-only