Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: CI

on:
push:
branches: [main]
pull_request:

jobs:
checks:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
extensions: pdo_pgsql
ini-file: development
coverage: none

- name: Cache Composer
uses: actions/cache@v4
with:
path: ~/.cache/composer
key: composer-${{ hashFiles('composer.lock') }}

- run: composer install --no-interaction --no-progress --prefer-dist

- run: composer format:check
- run: composer lint
- run: composer analyze
- run: composer test
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@

# laminas-api-sample

![CI](https://github.com/blakesimpson-dev/laminas-api-sample/actions/workflows/ci.yml/badge.svg)

A learning project using PHP 8.5, Laminas and Doctrine: a small REST backend
modelled on a slice of the
[Path of Exile developer API](https://www.pathofexile.com/developer/docs/reference).
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,10 @@
}
},
"scripts": {
"analyze": "mago analyze",
"analyze": "mago analyze --minimum-fail-level=warning",
"lint": "mago lint --minimum-fail-level=warning",
"format": "mago format",
"format:check": "mago format --dry-run",
"lint": "mago lint",
"test": "phpunit",
"serve": [
"Composer\\Config::disableProcessTimeout",
Expand Down
2 changes: 1 addition & 1 deletion mago.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ php-version = "8.5.0"

[source]
workspace = "."
paths = ["src/", "test/"]
paths = ["src/", "test/", "public/", "bin/", "config/", "bootstrap.php"]
includes = ["vendor/"]
excludes = ["migrations/"]

Expand Down
Loading