From 652abfe12a942848b8f5c9fba680f2d612c7fd2f Mon Sep 17 00:00:00 2001 From: Randy Geraads Date: Wed, 29 Nov 2023 14:19:50 +0100 Subject: [PATCH] use makefile in CI --- .github/workflows/ci.yml | 18 ++++++------------ Makefile | 2 +- 2 files changed, 7 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9834b802..c4c788cd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: [ push ] jobs: build: - runs-on: [ ubuntu-latest ] + runs-on: ubuntu-latest name: Run CI suite env: DATABASE_URL: 'mysql://root:0000@127.0.0.1:3306/app' @@ -22,11 +22,8 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: '8.2' - extensions: mysql + - name: Build the stack + run: make setup - name: The PHP Security Checker uses: symfonycorp/security-checker-action@v5 @@ -44,13 +41,10 @@ jobs: ${{ runner.os }}-composer- - name: Install dependencies - run: composer install --no-progress --ansi + run: make dependencies - name: Run cs-fixer - run: vendor/bin/php-cs-fixer fix --dry-run --stop-on-violation --ansi + run: make qa - name: Run tests - run: bin/phpunit - - - name: Run phpstan - run: vendor/bin/phpstan analyse --no-progress --ansi + run: make test diff --git a/Makefile b/Makefile index 19677cdc..3a39b408 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ ifneq ("$(wildcard .docker)","") endif test: phpunit ## Run the test suite -qa: phpstan cs lint ## Run the quality assurance suite +qa: validate-composer phpstan cs lint ## Run the quality assurance suite enable-docker: ## Enable Docker commands @touch .docker