First pass at getting integration tests running on Github actions
This commit is contained in:
parent
b7f5011abd
commit
faca237049
2 changed files with 41 additions and 0 deletions
|
@ -8,5 +8,8 @@ indent_size = 4
|
|||
charset = utf-8
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[.*yml]
|
||||
indent_size = 2
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
|
38
.github/workflows/tests.yml
vendored
Normal file
38
.github/workflows/tests.yml
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
name: tests
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
jobs:
|
||||
integration_tests:
|
||||
runs-on: ubuntu-latest
|
||||
services:
|
||||
mysql:
|
||||
image: mysql:5.7
|
||||
env:
|
||||
MYSQL_ALLOW_EMPTY_PASSWORD: yes
|
||||
MYSQL_DATABASE: panel_test
|
||||
ports:
|
||||
- 3306
|
||||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
php: [7.3, 7.4]
|
||||
name: PHP ${{ matrix.php }} Integration Tests
|
||||
steps:
|
||||
- name: checkout
|
||||
uses: actions/checkout@v2
|
||||
- name: setup
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: ${{ matrix.php }}
|
||||
extensions: cli, openssl, gd, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip
|
||||
tools: composer:v1
|
||||
coverage: none
|
||||
- name: install dependencies
|
||||
run: composer install --prefer-dist --no-interation --no-progress
|
||||
- name: execute tests
|
||||
run: vendor/bin/phpunit tests/Integration
|
||||
env:
|
||||
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
|
||||
TESTING_DB_USERNAME: root
|
Loading…
Reference in a new issue