Skip to content

Commit

Permalink
Restore yml changes fro allowed remote
Browse files Browse the repository at this point in the history
  • Loading branch information
Derek Crannaford committed Oct 4, 2024
1 parent 1fd838f commit 4c2a46a
Showing 1 changed file with 9 additions and 86 deletions.
95 changes: 9 additions & 86 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,12 @@ jobs:
done
# Pre-requisites Prepare Cmfive Environment
- name: Setup cmfive Test Environment
run: |
docker exec -t cmfive sh -c "chmod -R ugo=rwX /var/www/html*"

# Tests will assume playwright code is executable
# we should rely on deployment methods already to have provisioned:
# - name: Setup cmfive Test Environment
# run: |
# docker exec -t cmfive sh -c "chmod -R ugo=rwX /var/www/html*"

- name: Inject configs into cmfive Test Environment
run: |
Expand All @@ -143,88 +146,9 @@ jobs:
echo "⚠️ WARNING: could not find dev tools in boilerplate"
fi
- name: Prepare cmfive Test DB
run: |
docker exec -t cmfive sh -c "DB_HOST=mysql-8 DB_USERNAME=root DB_PASSWORD=root DB_DATABASE=$DB_DATABASE DB_PORT=3306 php cmfive.php testDB setup; exit \$?";
# Setup Node
- uses: actions/setup-node@v4
with:
node-version: 20

# Run Unit Tests
- name: "Run unit tests"
run: |
docker exec -u root cmfive chmod -R ugo=rwX /var/www/html/test/
docker exec -u cmfive cmfive sh -c "DB_HOST=mysql-8 DB_USERNAME=$DB_USERNAME DB_PASSWORD=$DB_PASSWORD DB_DATABASE=$DB_DATABASE DB_PORT=3306 php cmfive.php tests unit all; exit \$?"
if [ $? -gt 0 ]; then
echo "Admin module tests failed"
fi
# Setup playwright
- name: Setup Playwright
run: |
echo "Installing Playwright"
cd boilerplate/test/playwright
npm ci
npx playwright install --with-deps
- name: "Run admin module tests"
run: |
docker exec -u root cmfive sh -c "chmod ugo=rwX -R /var/www/html/system/modules/admin/install/migrations/"
cd boilerplate/test/playwright
npm run build
npm run test --module="admin" --reporter="github"
if [ $? -gt 0 ]; then
echo "Admin module tests failed"
fi
- name: "Run channel module tests"
- name: Run Unit and Playwright tests
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="channel" --reporter="github"
if [ $? -gt 0 ]; then
echo "Channel module tests failed"
fi
- name: "Run form module tests"
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="form" --reporter="github"
if [ $? -gt 0 ]; then
echo "Form module tests failed"
fi
- name: "Run report module tests"
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="report" --reporter="github"
if [ $? -gt 0 ]; then
echo "Report module tests failed"
fi
- name: "Run tag module tests"
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="tag" --reporter="github"
if [ $? -gt 0 ]; then
echo "Tag module tests failed"
fi
- name: "Run task module tests"
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="task" --reporter="github"
if [ $? -gt 0 ]; then
echo "Task module tests failed"
fi
- name: "Run timelog module tests"
run: |
cd boilerplate/test/playwright
npm run build
npm run test --module="timelog" --reporter="github"
if [ $? -gt 0 ]; then
echo "Timelog module tests failed"
fi
sh test/docker_run_tests.sh --cosine_container cmfive
- name: Get container logs
if: ${{ failure() }} || ${{ success() }}
Expand All @@ -245,9 +169,8 @@ jobs:
if: ${{ failure() }} || ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: test-output-${{matrix.node_version}}
name: test-output
path: |
boilerplate/test/Codeception/tests/_output/
boilerplate/storage/log/
boilerplate/test/playwright/test-results/
boilerplate/test/playwright/playwright-report/
Expand Down

0 comments on commit 4c2a46a

Please sign in to comment.