-
Notifications
You must be signed in to change notification settings - Fork 12
54 lines (54 loc) · 2.07 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: Tests
on: [push]
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1
- name: Composer install
run: composer install
- name: Create Docker network
run: docker network create kikdev
- name: Shutdown default MySQL
run: sudo service mysql stop
- name: Setup services
run: docker compose -f docker/docker-compose-services.yml up -d
env:
PASS: adminkik12
- name: Setup test services
run: |
ln -s ../../vendor tests/TestSitePath/vendor
docker compose -f docker/docker-compose-test.yml -p kikcms_test up -d
mkdir tests/TestSitePath/cache
mkdir tests/TestSitePath/cache/cache
mkdir tests/TestSitePath/storage/keyvalue
sudo chmod 777 tests/TestSitePath/cache
sudo chmod 777 tests/TestSitePath/cache/cache
sudo chmod 777 tests/TestSitePath/storage/keyvalue
sudo chmod 777 tests/TestSitePath/storage/media
sudo chmod 777 tests/TestSitePath/storage/media/1.png
sudo chmod 777 tests/TestSitePath/public_html/media/files
sudo chmod 777 tests/TestSitePath/public_html/media/thumbs
env:
SITE_ALIAS: kikcmstest-phalcon5.dev
SITE_PORT: 9903
- name: Sleep for 15 seconds
uses: jakejarvis/wait-action@master
with:
time: '15s'
- name: Create test DB
run: docker exec -i docker-mysql-1 mysql -uroot -padminkik12 -e "CREATE DATABASE test"
- name: Fill test DB
run: |
docker exec -i docker-mysql-1 mysql -uroot -padminkik12 test < install.sql
docker exec -i docker-mysql-1 mysql -uroot -padminkik12 test < tests/test.sql
- name: Build Js & CSS
run: |
cd assets
npm install
npm run bower install
gulp
cd ..
- name: Run tests
run: docker run --net="kikdev" -v "$(pwd)":/opt/project --rm kiksaus/kikdev-phalcon5:latest /opt/project/vendor/bin/codecept run -c /opt/project/codeception.yml