diff --git a/.github/workflows/cypress-end-to-end-tests.yml b/.github/workflows/cypress-end-to-end-tests.yml index a3bc530fb..f4fac0ec5 100644 --- a/.github/workflows/cypress-end-to-end-tests.yml +++ b/.github/workflows/cypress-end-to-end-tests.yml @@ -5,7 +5,57 @@ on: branches: [main] jobs: + # This job is made to setup path filtering, learn more about it here: https://github.com/facebookresearch/Mephisto/pull/857 + changes: + runs-on: ubuntu-latest + # Set job outputs to values from filters step below + outputs: + static_react_task: ${{ steps.filter.outputs.static_react_task }} + static_react_task_with_tips: ${{ steps.filter.outputs.static_react_task_with_tips }} + mnist: ${{ steps.filter.outputs.mnist }} + template: ${{ steps.filter.outputs.template }} + toxicity_detection: ${{ steps.filter.outputs.toxicity_detection }} + abstractions: ${{ steps.filter.outputs.abstractions }} + data_model: ${{ steps.filter.outputs.data_model }} + operations: ${{ steps.filter.outputs.operations }} + tools: ${{ steps.filter.outputs.tools }} + mephisto-task: ${{ steps.filter.outputs.mephisto-task }} + mephisto-worker-addons: ${{ steps.filter.outputs.mephisto-worker-addons }} + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 2 + - uses: dorny/paths-filter@v2 + id: filter + with: + filters: | + static_react_task: + - 'examples/static_react_task/**' + static_react_task_with_tips: + - 'examples/static_react_task_with_tips/**' + mnist: + - 'examples/remote_procedure/mnist/**' + template: + - 'examples/remote_procedure/template/**' + toxicity_detection: + - 'examples/remote_procedure/toxicity_detection/**' + abstractions: + - 'mephisto/abstractions/**' + data_model: + - 'mephisto/data_model/**' + operations: + - 'mephisto/operations/**' + tools: + - 'mephisto/tools/**' + mephisto-task: + - 'packages/mephisto-task/src/**' + mephisto-worker-addons: + - 'packages/mephisto-worker-addons/src/**' + + # Learn more about this test here: https://github.com/facebookresearch/Mephisto/pull/795 static-react-task: + needs: changes + if: ${{ (needs.changes.outputs.static_react_task == 'true') || (needs.changes.outputs.mephisto-task == 'true') || (needs.changes.outputs.abstractions == 'true') || (needs.changes.outputs.data_model == 'true') || (needs.changes.outputs.operations == 'true') || (needs.changes.outputs.tools == 'true')}} runs-on: ubuntu-latest steps: - name: 🔀 Checking out repo @@ -47,9 +97,11 @@ jobs: command-prefix: yarn dlx headless: true + # Learn more about the remote_procedure_tests here: https://github.com/facebookresearch/Mephisto/pull/800 remote_procedure_template: + needs: changes + if: ${{ (needs.changes.outputs.template == 'true') || (needs.changes.outputs.mephisto-task == 'true') || (needs.changes.outputs.abstractions == 'true') || (needs.changes.outputs.data_model == 'true') || (needs.changes.outputs.operations == 'true') || (needs.changes.outputs.tools == 'true')}} runs-on: ubuntu-latest - steps: - name: 🔀 Checking out repo uses: actions/checkout@v2 @@ -91,8 +143,9 @@ jobs: headless: true remote_procedure_mnist: + needs: changes + if: ${{ (needs.changes.outputs.mnist == 'true') || (needs.changes.outputs.mephisto-task == 'true') }} runs-on: ubuntu-latest - steps: - name: 🔀 Checking out repo uses: actions/checkout@v2 @@ -136,8 +189,9 @@ jobs: headless: true remote_procedure_toxicity_detection: + needs: changes + if: ${{ (needs.changes.outputs.toxicity_detection == 'true') || (needs.changes.outputs.mephisto-task == 'true') }} runs-on: ubuntu-latest - steps: - name: 🔀 Checking out repo uses: actions/checkout@v2 @@ -178,9 +232,11 @@ jobs: command-prefix: yarn dlx headless: true + # Learn more about this test here: https://github.com/facebookresearch/Mephisto/pull/833 static_react_task_with_tips: + needs: changes + if: ${{ (needs.changes.outputs.static_react_task_with_tips == 'true') || (needs.changes.outputs.mephisto-task == 'true') || (needs.changes.outputs.mephisto-worker-addons == 'true') || (needs.changes.outputs.abstractions == 'true') || (needs.changes.outputs.data_model == 'true') || (needs.changes.outputs.operations == 'true') || (needs.changes.outputs.tools == 'true')}} runs-on: ubuntu-latest - # Steps represent a sequence of tasks that will be executed as part of the job steps: - name: 🔀 Checking out repo uses: actions/checkout@v2