Skip to content

Commit

Permalink
Merge pull request #868 from facebookresearch/add-path-filter
Browse files Browse the repository at this point in the history
Add path filter
  • Loading branch information
Etesam913 committed Jul 27, 2022
2 parents aa60850 + 4a11a8a commit fc28f34
Showing 1 changed file with 60 additions and 4 deletions.
64 changes: 60 additions & 4 deletions .github/workflows/cypress-end-to-end-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit fc28f34

Please sign in to comment.