Skip to content

Commit

Permalink
only look for module tests in a tests directory
Browse files Browse the repository at this point in the history
  • Loading branch information
circlecube committed Jun 18, 2024
1 parent 2f86c48 commit 91fb740
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 91fb740

Please sign in to comment.