Skip to content

Commit ef6d1df

Browse files
committed
Use GitHub actions for Continuous Integration tests
1 parent f8ea8b7 commit ef6d1df

File tree

2 files changed

+51
-49
lines changed

2 files changed

+51
-49
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "Continuous Integration"
2+
3+
on: [push]
4+
5+
env:
6+
fail-fast: true
7+
8+
jobs:
9+
phpunit-mysql:
10+
name: "PHPUnit with MySQL"
11+
runs-on: "ubuntu-22.04"
12+
13+
strategy:
14+
matrix:
15+
php-version:
16+
- "7.4"
17+
mysql-version:
18+
- "5.7"
19+
# extension:
20+
# # - "mysqli"
21+
# # - "pdo_mysql"
22+
# - "pdo_sqlite"
23+
24+
services:
25+
mysql:
26+
image: "mysql:${{ matrix.mysql-version }}"
27+
28+
options: >-
29+
--health-cmd "mysqladmin ping --silent"
30+
-e MYSQL_ALLOW_EMPTY_PASSWORD=yes
31+
-e MYSQL_DATABASE=test
32+
ports:
33+
- "3306:3306"
34+
35+
steps:
36+
- name: "Checkout"
37+
uses: "actions/checkout@v3"
38+
39+
- name: "Install PHP"
40+
uses: "shivammathur/setup-php@v2"
41+
with:
42+
php-version: "${{ matrix.php-version }}"
43+
# extensions: "pdo_mysql pdo_sqlite"
44+
# extensions: "${{ matrix.extension }}"
45+
ini-values: "pdo_mysql.default_socket=/var/run/mysqld/mysql.sock"
46+
47+
- name: "Install dependencies with Composer"
48+
uses: "ramsey/composer-install@v2"
49+
50+
- name: "Run Tests"
51+
run: "cd tests && php run.php"

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

0 commit comments

Comments
 (0)