Added travis-ci configuration
This commit is contained in:
parent
3f4203fdf0
commit
c002e98156
8 changed files with 73 additions and 0 deletions
22
.travis.yml
Normal file
22
.travis.yml
Normal file
|
@ -0,0 +1,22 @@
|
|||
sudo: required
|
||||
dist: trusty
|
||||
language: php
|
||||
services:
|
||||
- mysql
|
||||
php:
|
||||
- "7.1"
|
||||
before_install:
|
||||
- sudo rm -rf ~/.nvm
|
||||
- curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
|
||||
- sudo apt-get install -y nodejs build-essential
|
||||
install:
|
||||
- .travis/frontend-install.sh
|
||||
- .travis/backend-install.sh
|
||||
before_script:
|
||||
- mysql -e 'CREATE DATABASE pdnstest;'
|
||||
- .travis/backend-start-server.sh &
|
||||
script:
|
||||
- .travis/frontend-lint.sh
|
||||
- .travis/backend-lint.sh
|
||||
- .travis/backend-test.sh
|
||||
|
19
.travis/backend-install.sh
Executable file
19
.travis/backend-install.sh
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd backend/src
|
||||
if ! composer install
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
cd ../..
|
||||
|
||||
cd backend/test
|
||||
if ! npm install
|
||||
then
|
||||
exit 2
|
||||
fi
|
||||
cp ../../.travis/data/config-backend-test.sh config.sh
|
||||
cd ../..
|
||||
|
||||
exit 0
|
||||
|
5
.travis/backend-lint.sh
Executable file
5
.travis/backend-lint.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd backend/src
|
||||
|
||||
composer run-script lint
|
5
.travis/backend-start-server.sh
Normal file
5
.travis/backend-start-server.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd backend/src/public
|
||||
|
||||
php -S localhost:8000
|
5
.travis/backend-test.sh
Normal file
5
.travis/backend-test.sh
Normal file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd backend/test
|
||||
|
||||
./test.sh all
|
7
.travis/data/config-backend-test.sh
Normal file
7
.travis/data/config-backend-test.sh
Normal file
|
@ -0,0 +1,7 @@
|
|||
|
||||
DBHOST="localhost"
|
||||
DBUSER="root"
|
||||
DBPASSWORD=""
|
||||
DBNAME="pdnstest"
|
||||
|
||||
TESTURL="http://localhost:8000/v1"
|
5
.travis/frontend-install.sh
Executable file
5
.travis/frontend-install.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd frontend
|
||||
|
||||
npm install
|
5
.travis/frontend-lint.sh
Executable file
5
.travis/frontend-lint.sh
Executable file
|
@ -0,0 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
cd frontend
|
||||
|
||||
npm run lint
|
Loading…
Reference in a new issue