Set up GitHub Actions
This commit is contained in:
1 parent
430919bcdf
commit
beeff70d98
4 files changed
+61
-19
No files matched your search
@@ -0,0 +1,43 @@
|
|||||||
|
name: Tests
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: [ master ]
|
||||||
|
pull_request:
|
||||||
|
branches: [ master ]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
tests:
|
||||||
|
runs-on: ubuntu-18.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- name: Setup PHP
|
||||||
|
uses: shivammathur/setup-php@v2
|
||||||
|
with:
|
||||||
|
php-version: '7.2'
|
||||||
|
tools: phpunit:9,psalm
|
||||||
|
|
||||||
|
- name: Setup problem matchers for PHPUnit
|
||||||
|
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
|
||||||
|
|
||||||
|
- name: Get composer cache directory
|
||||||
|
id: composercache
|
||||||
|
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
|
||||||
|
|
||||||
|
- name: Cache dependencies
|
||||||
|
uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.composercache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
||||||
|
restore-keys: ${{ runner.os }}-composer-
|
||||||
|
|
||||||
|
- run: composer install --no-interaction
|
||||||
|
|
||||||
|
- name: Psalm
|
||||||
|
run: psalm --output-format=github
|
||||||
|
if: always()
|
||||||
|
|
||||||
|
- name: PHPUnit
|
||||||
|
run: phpunit --coverage-text
|
||||||
|
if: always()
|
||||||
@@ -4,9 +4,7 @@
|
|||||||
|
|
||||||
_Make a site, make it fast._
|
_Make a site, make it fast._
|
||||||
|
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
[](https://github.com/Rarst/laps/actions/workflows/tests.yml)
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/build-status/master)
|
|
||||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
[](https://packagist.org/packages/rarst/laps)
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
[](https://packagist.org/packages/rarst/laps)
|
||||||
[](https://packagist.org/packages/rarst/laps)
|
[](https://packagist.org/packages/rarst/laps)
|
||||||
@@ -39,7 +37,7 @@ API requests need to be authenticated as admin for performance data to be sent.
|
|||||||
|
|
||||||
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
| [Composer](https://getcomposer.org/) (recommended) | Release archive |
|
||||||
| -------------------------------------------------- | -------- |
|
| -------------------------------------------------- | -------- |
|
||||||
| `composer require rarst/laps` | [](https://github.com/Rarst/laps/releases/latest/download/laps.zip) |
|
| `composer require rarst/laps` | [](https://github.com/Rarst/laps/releases/latest/download/laps.zip)|
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|||||||
+15
-14
@@ -1,15 +1,16 @@
|
|||||||
<phpunit bootstrap="vendor/autoload.php">
|
<?xml version="1.0"?>
|
||||||
<testsuites>
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||||
<testsuite name="Laps">
|
<coverage processUncoveredFiles="true">
|
||||||
<directory>tests</directory>
|
<include>
|
||||||
</testsuite>
|
<directory suffix=".php">src</directory>
|
||||||
</testsuites>
|
</include>
|
||||||
<filter>
|
<exclude>
|
||||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
<directory suffix=".php">src/mustache/cache</directory>
|
||||||
<directory suffix=".php">src</directory>
|
</exclude>
|
||||||
<exclude>
|
</coverage>
|
||||||
<directory suffix=".php">src/mustache/cache</directory>
|
<testsuites>
|
||||||
</exclude>
|
<testsuite name="Laps">
|
||||||
</whitelist>
|
<directory>tests</directory>
|
||||||
</filter>
|
</testsuite>
|
||||||
|
</testsuites>
|
||||||
</phpunit>
|
</phpunit>
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
totallyTyped="false"
|
|
||||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
xmlns="https://getpsalm.org/schema/config"
|
xmlns="https://getpsalm.org/schema/config"
|
||||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||||
|
errorLevel="2"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
<directory name="src"/>
|
<directory name="src"/>
|
||||||
|
|||||||
Reference in new issue
Block a user