Update CI file and implemented makefile #22
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
security-check: | |
name: Security Checker | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: symfonycorp/security-checker-action@v5 | |
test: | |
name: Run tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Setup PHP | |
uses: nanasess/setup-php@v4 | |
with: | |
php-version: "8.1" | |
- name: Remove composer.lock and vendor | |
run: | | |
rm -f composer.lock | |
rm -rf vendor | |
- name: Cache Vendor | |
uses: actions/cache@v4 | |
id: cache-vendor | |
with: | |
path: vendor | |
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }} | |
- name: Install Dependencies | |
if: steps.cache-vendor.outputs.cache-hit != 'true' | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress | |
- name: Execute tests (Unit and Feature tests) via PHPUnit | |
run: vendor/bin/phpunit | |
format: | |
name: Fix PHP Coding Style | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Setup PHP | |
uses: nanasess/setup-php@v4 | |
with: | |
php-version: "8.1" | |
- name: Remove composer.lock and vendor | |
run: | | |
rm -f composer.lock | |
rm -rf vendor | |
- name: Cache Vendor | |
uses: actions/cache@v4 | |
id: cache-vendor | |
with: | |
path: vendor | |
key: ${{ runner.os }}-vendor-${{ hashFiles('**/composer.lock') }} | |
- name: Install Dependencies | |
if: steps.cache-vendor.outputs.cache-hit != 'true' | |
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress | |
- name: Run php-cs-fixer | |
run: vendor/bin/php-cs-fixer fix | |
- uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Apply php-cs-fixer changes |