Skip to content

Merge pull request #5 from WildCodeSchool/fix-readme-file-wuser-expla… #6

Merge pull request #5 from WildCodeSchool/fix-readme-file-wuser-expla…

Merge pull request #5 from WildCodeSchool/fix-readme-file-wuser-expla… #6

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
push:
branches: [ dev, main ]
pull_request:
branches: [ dev, main ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a set of commands using the runners shell
- name: checks_directory
run: |
if [ -d "./.idea" ]; then echo "Forbidden PHPStorm folder (.idea/) found ! Please, ignore in .gitignore"; exit 2; fi
if [ -d "./.vscode" ]; then echo "Forbidden VScode folder (.vscode) found ! Please, ignore in .gitignore"; exit 2; fi
if [ $(find ./ -name .DS_Store) ]; then echo "Forbidden MacOS boring file (.DS_Store) found ! Please, ignore in .gitignore"; exit 2; fi
if [ -d "./vendor" ]; then echo "Forbidden external libs folder (vendor/) found !"; exit 2; fi
# Runs a single command using the runners shell
- name: Composer
run: composer install
- name: code_quality
run: |
./vendor/bin/phpcs
./vendor/bin/phpstan analyse src --level 5
./vendor/bin/phpmd src text phpmd.xml