Skip to content

Added impersonate function #601

Added impersonate function

Added impersonate function #601

Workflow file for this run

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-phalcon4.dev
SITE_PORT: 9901
- 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-phalcon4:latest /opt/project/vendor/bin/codecept run -c /opt/project/codeception.yml