init
This commit is contained in:
commit
70aa53bd16
31
.github/workflows/main.yml
vendored
Normal file
31
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
|||
---
|
||||
name: Run tests
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
jobs:
|
||||
phpunit:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
matrix:
|
||||
php-version: ['7.4']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
|
||||
- name: Configure PHP ${{ matrix.php-version }}
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php-version }}
|
||||
|
||||
- name: Cache dependencies
|
||||
uses: actions/cache@v1
|
||||
with:
|
||||
path: ~/.composer/cache/files
|
||||
key: dependencies-composer-${{ hashFiles('composer.json') }}
|
||||
|
||||
- name: Run tests
|
||||
run: make test
|
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
*
|
||||
!/*
|
||||
!/.github/**
|
||||
!/composer.*
|
||||
!/phpunit.xml
|
||||
!/README.md
|
||||
!/src/**
|
||||
!/tests/**
|
19
Makefile
Normal file
19
Makefile
Normal file
|
@ -0,0 +1,19 @@
|
|||
CLEAN_PATHS=vendor
|
||||
PHPUNIT_PATH=vendor/bin/phpunit
|
||||
|
||||
all: test
|
||||
|
||||
clean:
|
||||
@for dir in $(CLEAN_PATHS); do \
|
||||
rm -fr $$dir; \
|
||||
done
|
||||
|
||||
phpunit: vendor
|
||||
@$(PHPUNIT_PATH) --colors=always --testdox
|
||||
|
||||
test: phpunit
|
||||
|
||||
vendor: composer.json composer.lock
|
||||
@composer install
|
||||
|
||||
.PHONY: all clean phpunit test
|
20
composer.json
Normal file
20
composer.json
Normal file
|
@ -0,0 +1,20 @@
|
|||
{
|
||||
"minimum-stability": "dev",
|
||||
"prefer-stable": true,
|
||||
"require-dev": {
|
||||
"phpunit/phpunit": "^9.0"
|
||||
},
|
||||
"autoload": {
|
||||
"psr-4": {
|
||||
"App\\": "src/"
|
||||
}
|
||||
},
|
||||
"autoload-dev": {
|
||||
"psr-4": {
|
||||
"App\\Tests\\": "tests/"
|
||||
}
|
||||
},
|
||||
"config": {
|
||||
"sort-packages": true
|
||||
}
|
||||
}
|
1804
composer.lock
generated
Normal file
1804
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
12
phpunit.xml
Normal file
12
phpunit.xml
Normal file
|
@ -0,0 +1,12 @@
|
|||
<?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"
|
||||
>
|
||||
<testsuites>
|
||||
<testsuite name="Unit">
|
||||
<directory suffix="Test.php">./tests</directory>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
</phpunit>
|
Loading…
Reference in a new issue