Skip to content

Commit

Permalink
Merge pull request #14 from newfold-labs/fix/only-run-module-tests-in…
Browse files Browse the repository at this point in the history
…-module-tests

Only look for module tests in a tests directory
  • Loading branch information
circlecube authored Jun 18, 2024
2 parents 2f86c48 + 91fb740 commit f82832b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/module-plugin-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -232,13 +232,13 @@ jobs:
- name: Check for module tests
id: check-for-module-tests
run:
if [[ $(find ./vendor/${{ inputs.module-repo }} -depth -name '*.cy*') ]]; then MODULE_TESTS_FOUND=1; else MODULE_TESTS_FOUND=0; fi;
if [[ $MODULE_TESTS_FOUND -eq 0 ]]; then echo "No module Cypress tests found"; fi;
if [[ $(find ./vendor/${{ inputs.module-repo }}/tests -depth -name '*.cy.js') ]]; then MODULE_TESTS_FOUND=1; else MODULE_TESTS_FOUND=0; fi;
if [[ $MODULE_TESTS_FOUND -eq 0 ]]; then echo "No module Cypress tests found"; else echo "Module tests found"; fi;
echo "MODULE_TESTS_FOUND=$MODULE_TESTS_FOUND" >> $GITHUB_OUTPUT;

- name: Run Module Cypress Tests
if: ${{ steps.check-for-module-tests.outputs.MODULE_TESTS_FOUND == 1 }}
run: npm run test:e2e -- --browser chrome --spec "vendor/(${{ inputs.module-repo }}/**/*.cy.js)"
run: npm run test:e2e -- --browser chrome --spec "vendor/(${{ inputs.module-repo }}/tests/**/*.cy.js)"

- name: Run Remaining Cypress Tests
if: ${{ ! inputs.only-module-tests }}
Expand Down

0 comments on commit f82832b

Please sign in to comment.