mirror of
https://codeberg.org/demostf/api.git
synced 2026-06-03 18:04:08 +02:00
github actions
This commit is contained in:
parent
7320711a36
commit
63ceb607dd
4 changed files with 818 additions and 578 deletions
55
.github/workflows/ci.yaml
vendored
Normal file
55
.github/workflows/ci.yaml
vendored
Normal file
|
|
@ -0,0 +1,55 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
php-cs-fixer:
|
||||||
|
name: PHP-CS-Fixer
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@master
|
||||||
|
- name: PHP-CS-Fixer
|
||||||
|
uses: OskarStark/php-cs-fixer-ga@2.16.7
|
||||||
|
with:
|
||||||
|
args: --diff --dry-run --allow-risky yes --stop-on-violation --using-cache=no --path-mode=intersection
|
||||||
|
|
||||||
|
phpstan:
|
||||||
|
name: PHPStan Static Analysis
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: php-actions/composer@v2
|
||||||
|
- uses: php-actions/phpstan@v1
|
||||||
|
with:
|
||||||
|
error_format: github
|
||||||
|
args: src
|
||||||
|
|
||||||
|
phpunit:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Unit tests
|
||||||
|
|
||||||
|
services:
|
||||||
|
db:
|
||||||
|
image: demostf/db
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: test
|
||||||
|
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: php-actions/composer@v2
|
||||||
|
- name: PHPUnit Tests
|
||||||
|
uses: docker://icewind1991/php-alpine-apcu
|
||||||
|
env:
|
||||||
|
DB_PORT: 5432
|
||||||
|
DB_TYPE: pgsql
|
||||||
|
DB_HOST: db
|
||||||
|
DB_USERNAME: postgres
|
||||||
|
DB_PASSWORD: test
|
||||||
|
DB_DATABASE: postgres
|
||||||
|
with:
|
||||||
|
entrypoint: php
|
||||||
|
args: ./vendor/bin/phpunit test
|
||||||
4
Makefile
4
Makefile
|
|
@ -11,12 +11,12 @@ node_modules: package.json
|
||||||
|
|
||||||
.PHONY: mocha
|
.PHONY: mocha
|
||||||
mocha: node_modules
|
mocha: node_modules
|
||||||
DEMO_ROOT=/tmp/demos DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres\
|
DEMO_ROOT=/tmp/demos DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres\
|
||||||
PARSER_PATH=/home/robin/Projects/demostf/tf-demo-parser/target/release/parse_demo node node_modules/.bin/mocha --recursive
|
PARSER_PATH=/home/robin/Projects/demostf/tf-demo-parser/target/release/parse_demo node node_modules/.bin/mocha --recursive
|
||||||
|
|
||||||
.PHONY: phpunit
|
.PHONY: phpunit
|
||||||
phpunit:
|
phpunit:
|
||||||
cd test; DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres ../vendor/bin/phpunit
|
DB_PORT=5433 DB_TYPE=pgsql DB_HOST=localhost DB_USERNAME=postgres DB_USERNAME=postgres DB_PASSWORD=test DB_DATABASE=postgres ./vendor/bin/phpunit test
|
||||||
|
|
||||||
.PHONY: test
|
.PHONY: test
|
||||||
tests: phpunit mocha
|
tests: phpunit mocha
|
||||||
|
|
|
||||||
|
|
@ -5,8 +5,8 @@
|
||||||
"ircmaxell/random-lib": "^1.1",
|
"ircmaxell/random-lib": "^1.1",
|
||||||
"ehesp/steam-login": "^1.2",
|
"ehesp/steam-login": "^1.2",
|
||||||
"koraktor/steam-condenser": "^1.3",
|
"koraktor/steam-condenser": "^1.3",
|
||||||
"guzzlehttp/guzzle": "^6.3",
|
"guzzlehttp/guzzle": "^6.5",
|
||||||
"doctrine/dbal": "^2.9",
|
"doctrine/dbal": "^2.12",
|
||||||
"ext-pdo": "*"
|
"ext-pdo": "*"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
|
|
@ -19,8 +19,8 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"phpunit/phpunit": "8.0",
|
"phpunit/phpunit": "9.0",
|
||||||
"friendsofphp/php-cs-fixer": "^2.4",
|
"friendsofphp/php-cs-fixer": "^2.16",
|
||||||
"phan/phan": "^1.2.1"
|
"phpstan/phpstan": "^0.12.57"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
1503
composer.lock
generated
1503
composer.lock
generated
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue