From 91fb7400ffa4d1d6caf168514a8315b29a2f2ff9 Mon Sep 17 00:00:00 2001 From: Evan Mullins Date: Tue, 18 Jun 2024 16:26:47 -0400 Subject: [PATCH] only look for module tests in a tests directory --- .github/workflows/module-plugin-test.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/module-plugin-test.yml b/.github/workflows/module-plugin-test.yml index 8172ff4..d1e0037 100644 --- a/.github/workflows/module-plugin-test.yml +++ b/.github/workflows/module-plugin-test.yml @@ -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 }}