-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #238 from 2pisoftware/remove-stale
Delete .github/workflows/stale.yml
- Loading branch information
Showing
2 changed files
with
12 additions
and
72 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -62,65 +62,40 @@ jobs: | |
ref: 'develop' | ||
|
||
# Pre-requisites Prepare Cmfive Environment | ||
- name: Setup cmfive Test Environment | ||
- name: Start containers | ||
run: | | ||
cp .codepipeline/test_agent/configs/test_agent-config.php config.php | ||
docker compose -f docker-compose.yml up --build -d --wait --wait-timeout 120 | ||
docker-compose -f test_agent-compose.yml up --build -d | ||
sleep 5 | ||
docker ps | ||
docker exec -t nginx-php8.1 bash -c "chmod -R 777 ./*" | ||
docker exec -t nginx-php8.1 bash -c "rm -rf ./system && ln -s ./composer/vendor/2pisoftware/cmfive-core/system ./system" | ||
echo CoreInstall | ||
docker exec -t nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php install core ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}} 8.1" | ||
echo DBCreate | ||
docker exec -t mysql-8 bash -c "mysql -h 127.0.0.1 -u'root' -p'root' --execute \"CREATE DATABASE cmfive_test; CREATE USER cmfive_test@'%' IDENTIFIED BY 'cmfive_test'; GRANT ALL PRIVILEGES ON cmfive_test.* TO cmfive_test@'%'; GRANT PROCESS ON *.* TO cmfive_test@'%'; FLUSH PRIVILEGES;\"" | ||
# Pre-requisites Prepare Cmfive Environment | ||
- name: Setup cmfive Test Environment | ||
run: | | ||
echo DBCreate | ||
docker exec -t mysql-8 bash -c "mysql -h 127.0.0.1 -u'root' -p'root' --execute \"CREATE DATABASE cmfive_test; CREATE USER cmfive_test@'%' IDENTIFIED BY 'cmfive_test'; GRANT ALL PRIVILEGES ON cmfive_test.* TO cmfive_test@'%'; GRANT PROCESS ON *.* TO cmfive_test@'%'; FLUSH PRIVILEGES;\"" | ||
docker exec -t cmfive bash -c "chmod -R 777 ./*" | ||
docker exec -t nginx-php8.1 bash -c "chmod -R 777 cache/ storage/ uploads/" | ||
docker start seleniumDrv; | ||
docker ps | ||
- name: Inject configs into cmfive Test Environment | ||
run: | | ||
echo "Inheriting test_agent config from PIPELINE" | ||
echo 'Config::append("tests", ["testrunner" => "ENABLED"]);' >> config.php | ||
- name: Prepare cmfive Test Backend | ||
run: | | ||
docker exec nginx-php8.1 bash -c "cd ./test/ && sh ./.install/install.sh && chmod -R 777 /var/www/html/test/Codeception/tests" | ||
- name: Apply cmfive Test Config to Core install | ||
run: | | ||
echo SeedingCmfive | ||
docker exec nginx-php8.1 bash -c "cat config.php" | ||
# docker exec -t nginx-php8.1 bash -c "php cmfive.php install core ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | ||
docker exec -t nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php seed encryption" | ||
docker exec -t nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php install migrations" | ||
docker exec -t nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php seed admin admin admin [email protected] admin admin" | ||
docker exec -t nginx-php8.1 bash -c "chmod -R 777 cache/ storage/ uploads/" | ||
docker exec cmfive bash -c "cd ./test/ && sh ./.install/install.sh && chmod -R 777 /var/www/html/test/Codeception/tests" | ||
- name: Prepare cmfive Test DB | ||
run: | | ||
docker exec -t nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php testDB setup; exit \$?"; | ||
docker exec -t cmfive bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php testDB setup; exit \$?"; | ||
# Build new layout | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: Build new designs | ||
run: | | ||
docker exec -t nginx-php8.1 bash -c "chmod -R 777 system/templates/base" | ||
cd system/templates/base | ||
npm i | ||
npm run prod | ||
# Run Unit Tests | ||
- name: "Run unit tests" | ||
run: | | ||
docker exec nginx-php8.1 bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php tests unit all; exit \$?" | ||
docker exec cmfive bash -c "DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 php cmfive.php tests unit all; exit \$?" | ||
if [ $? -gt 0 ]; then | ||
echo "Admin module tests failed" | ||
fi | ||
|
@@ -133,17 +108,7 @@ jobs: | |
# Run Acceptance Tests | ||
- name: "Confirm Codeception setup" | ||
run: | | ||
docker exec nginx-php8.1 bash -c "ls -lah -R /var/www/html/test/Codeception/tests && cat /var/www/html/test/Codeception/*.yml && cat /var/www/html/test/Codeception/tests/*.yml" | ||
# - name: "Run Playwright Module Tests" | ||
# run: | | ||
# export DB_HOST=mysql-8 DB_USERNAME=cmfive_test DB_PASSWORD=cmfive_test DB_DATABASE=cmfive_test DB_PORT=3306 | ||
# sudo chmod 777 -R system/modules/admin/install/migrations/ | ||
# cd test/playwright | ||
|
||
# for module in $PLAYWRIGHT_MODULES; do | ||
# npm run test:with-retries --module="$module" --platform="chromium" --attempts=3 --reporter="github" | ||
# done | ||
docker exec cmfive bash -c "ls -lah -R /var/www/html/test/Codeception/tests && cat /var/www/html/test/Codeception/*.yml && cat /var/www/html/test/Codeception/tests/*.yml" | ||
- name: "Run admin module tests" | ||
run: | | ||
|
This file was deleted.
Oops, something went wrong.