Skip to content

Commit

Permalink
ci: merge lint and static analysis workflow to a dedicated ci workflow (
Browse files Browse the repository at this point in the history
#74)

* ci: merge lint and static analysis workflow to a dedicated ci workflow

* style: fix code with pint
  • Loading branch information
fuzoh authored Jun 28, 2024
1 parent 672730d commit e7d5e6d
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 74 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/continous-integration.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Continous integration
on:
pull_request:
branches:
- main

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: libxml, json, dom, curl, mbstring
coverage: none

- name: Install Pint
run: composer global require laravel/pint

- name: Run Pint
run: pint --test -v

static-analysis:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none

- name: Install dependencies
run: composer update --prefer-stable --prefer-dist --no-interaction --no-progress

- name: Run PHPStan
run: vendor/bin/phpstan analyse --memory-limit=2G
27 changes: 0 additions & 27 deletions .github/workflows/php-code-style.yml

This file was deleted.

25 changes: 0 additions & 25 deletions .github/workflows/php-static-analysis.yml

This file was deleted.

38 changes: 19 additions & 19 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions public/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@
use Jobtrek\PhpSlimTodo\Pages\EditTodoPage;
use Jobtrek\PhpSlimTodo\Pages\HomePage;
use Jobtrek\PhpSlimTodo\SessionMiddleware;
use Jobtrek\PhpSlimTodo\TodoService;
use Psr\Http\Message\ResponseInterface as Response;
use Psr\Http\Message\ServerRequestInterface as Request;
use Slim\Factory\AppFactory;
use Slim\Views\Twig;
use Slim\Views\TwigMiddleware;
Expand Down

0 comments on commit e7d5e6d

Please sign in to comment.