Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add path filter #868

Merged
merged 4 commits into from
Jul 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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