Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: CI

on: [push]

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
php-versions: ['5.4', '5.5', '7.0']

services:
mysql:
image: mysql:5.5
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3

steps:
- uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
extensions: mysqli

- name: Setup Database
run: |
mysql -h 127.0.0.1 -u root -proot -e "CREATE DATABASE addressbook;"
mysql -h 127.0.0.1 -u root -proot addressbook < addressbook.sql

- name: Run tests
run: |
cp .github-offline/db.config.php config/cfg.db.php
php -S localhost:8000 -t . &
sleep 5
export SERVER_NAME="localhost:8000"
export REQUEST_URI="/index.php"
php test/index.php
7 changes: 0 additions & 7 deletions .travis.yml

This file was deleted.

Loading