Skip to content

Set up a CI pipeline with PHPUnit tests #30

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 1 commit into
base: trunk
Choose a base branch
from
Draft
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
27 changes: 27 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: CI
on:
push:
branches:
- trunk
pull_request:

jobs:
test-unit:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'
tools: composer:v2
coverage: xdebug

- name: Install Dependencies
run: composer install --no-interaction --prefer-dist --optimize-autoloader --ignore-platform-reqs

- name: Tests
run: ./vendor/bin/phpunit
8 changes: 5 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,18 +11,20 @@
"opis/json-schema": "^2.3"
},
"require-dev": {
"pestphp/pest": "^2.33",
"nette/php-generator": "^4.1",
"jane-php/json-schema": "^7.6",
"bamarni/composer-bin-plugin": "^1.8"
"bamarni/composer-bin-plugin": "^1.8",
"phpunit/phpunit": "^6.5"
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"allow-plugins": {
"pestphp/pest-plugin": true,
"php-http/discovery": true,
"bamarni/composer-bin-plugin": true
},
"platform": {
"php": "8.2"
}
},
"autoload": {
Expand Down
Loading