Set up GitHub Actions
This commit is contained in:
1 parent
430919bcdf
commit
beeff70d98
4 files changed
+55
-13
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._
|
||||
|
||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
||||
[](https://scrutinizer-ci.com/g/Rarst/laps/build-status/master)
|
||||
[](https://scrutinizer-ci.com/g/Rarst/laps/?branch=master)
|
||||
[](https://github.com/Rarst/laps/actions/workflows/tests.yml)
|
||||
[](https://packagist.org/packages/rarst/laps)
|
||||
[](https://packagist.org/packages/rarst/laps)
|
||||
[](https://packagist.org/packages/rarst/laps)
|
||||
|
||||
+10
-9
@@ -1,15 +1,16 @@
|
||||
<phpunit bootstrap="vendor/autoload.php">
|
||||
<?xml version="1.0"?>
|
||||
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||
<coverage processUncoveredFiles="true">
|
||||
<include>
|
||||
<directory suffix=".php">src</directory>
|
||||
</include>
|
||||
<exclude>
|
||||
<directory suffix=".php">src/mustache/cache</directory>
|
||||
</exclude>
|
||||
</coverage>
|
||||
<testsuites>
|
||||
<testsuite name="Laps">
|
||||
<directory>tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
<filter>
|
||||
<whitelist processUncoveredFilesFromWhitelist="true">
|
||||
<directory suffix=".php">src</directory>
|
||||
<exclude>
|
||||
<directory suffix=".php">src/mustache/cache</directory>
|
||||
</exclude>
|
||||
</whitelist>
|
||||
</filter>
|
||||
</phpunit>
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0"?>
|
||||
<psalm
|
||||
totallyTyped="false"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xmlns="https://getpsalm.org/schema/config"
|
||||
xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd"
|
||||
errorLevel="2"
|
||||
>
|
||||
<projectFiles>
|
||||
<directory name="src"/>
|
||||
|
||||
Reference in new issue
Block a user