Skip to content

Commit

Permalink
Fix up CI
Browse files Browse the repository at this point in the history
  • Loading branch information
benpoulson committed Jan 10, 2024
1 parent 1abee86 commit 16d11f2
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 26 deletions.
11 changes: 1 addition & 10 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,30 +8,21 @@ on:

jobs:
build:

name: PHP 8.0
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0' # Set the PHP version
coverage: xdebug

- name: Install dependencies
run: composer install --dev --prefer-dist --no-progress

- name: Setup workbench
run: vendor/bin/testbench workbench:install

- name: Run PHPUnit tests
run: vendor/bin/phpunit --coverage-clover=coverage.xml

- name: Run PHPStan tests
run: vendor/bin/phpstan.phar analyse src --memory-limit=512M

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down
8 changes: 3 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
"minimum-stability": "dev",
"prefer-stable": true,
"require-dev": {
"orchestra/testbench": "*",
"larastan/larastan": "*",
"phpunit/phpunit": "*"
"orchestra/testbench": "^6.41",
"larastan/larastan": "^1.0.4",
"phpunit/phpunit": "^9.6.15"
},
"autoload-dev": {
"psr-4": {
Expand All @@ -57,10 +57,8 @@
"@prepare"
],
"prepare": "@php vendor/bin/testbench package:discover --ansi",
"build": "@php vendor/bin/testbench workbench:build --ansi",
"serve": [
"Composer\\Config::disableProcessTimeout",
"@build",
"@php vendor/bin/testbench serve"
],
"lint": [
Expand Down
2 changes: 1 addition & 1 deletion composer.lock

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

14 changes: 4 additions & 10 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="true"
displayDetailsOnTestsThatTriggerWarnings="true"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
bootstrap="vendor/autoload.php"
colors="true"
stopOnFailure="true"
>
<testsuites>
<testsuite name="Unit">
<directory>tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory>src</directory>
</include>
</source>
<php>
<const name="PHPUNIT_RUNNING" value="true"/>
</php>
Expand Down

0 comments on commit 16d11f2

Please sign in to comment.