Skip to content

Commit faca237

Browse files
committed
First pass at getting integration tests running on Github actions
1 parent b7f5011 commit faca237

File tree

2 files changed

+41
-0
lines changed

2 files changed

+41
-0
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,8 @@ indent_size = 4
88
charset = utf-8
99
trim_trailing_whitespace = true
1010

11+
[.*yml]
12+
indent_size = 2
13+
1114
[*.md]
1215
trim_trailing_whitespace = false

.github/workflows/tests.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: tests
2+
on:
3+
push:
4+
pull_request:
5+
jobs:
6+
integration_tests:
7+
runs-on: ubuntu-latest
8+
services:
9+
mysql:
10+
image: mysql:5.7
11+
env:
12+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
13+
MYSQL_DATABASE: panel_test
14+
ports:
15+
- 3306
16+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
17+
strategy:
18+
fail-fast: true
19+
matrix:
20+
php: [7.3, 7.4]
21+
name: PHP ${{ matrix.php }} Integration Tests
22+
steps:
23+
- name: checkout
24+
uses: actions/checkout@v2
25+
- name: setup
26+
uses: shivammathur/setup-php@v2
27+
with:
28+
php-version: ${{ matrix.php }}
29+
extensions: cli, openssl, gd, mysql, pdo, mbstring, tokenizer, bcmath, xml, curl, zip
30+
tools: composer:v1
31+
coverage: none
32+
- name: install dependencies
33+
run: composer install --prefer-dist --no-interation --no-progress
34+
- name: execute tests
35+
run: vendor/bin/phpunit tests/Integration
36+
env:
37+
TESTING_DB_PORT: ${{ job.services.mysql.ports[3306] }}
38+
TESTING_DB_USERNAME: root

0 commit comments

Comments
 (0)