From 4cadbcec76911c850c51a3c4efa70a16e839cd68 Mon Sep 17 00:00:00 2001 From: Etesam Ansari Date: Thu, 21 Jul 2022 17:39:08 -0400 Subject: [PATCH 1/4] =?UTF-8?q?=F0=9F=93=9D=20Added=20path=20filtering=20t?= =?UTF-8?q?o=20github=20action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/cypress-end-to-end-tests.yml | 61 +++++++++++++++++-- 1 file changed, 57 insertions(+), 4 deletions(-) diff --git a/.github/workflows/cypress-end-to-end-tests.yml b/.github/workflows/cypress-end-to-end-tests.yml index a3bc530fb..855d47b69 100644 --- a/.github/workflows/cypress-end-to-end-tests.yml +++ b/.github/workflows/cypress-end-to-end-tests.yml @@ -5,7 +5,56 @@ on: branches: [main] jobs: + changes: + runs-on: ubuntu-latest + # Set job outputs to values from filter step + 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: + # For pull requests it's not necessary to checkout the code + - 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/**' + 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 @@ -48,8 +97,9 @@ jobs: headless: true 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 +141,9 @@ jobs: headless: true remote_procedure_mnist: + needs: changes + if: ${{ (needs.changes.outputs.mnist == '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 @@ -136,8 +187,9 @@ jobs: headless: true remote_procedure_toxicity_detection: + needs: changes + if: ${{ (needs.changes.outputs.toxicity_detection == '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 @@ -179,8 +231,9 @@ jobs: headless: true 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 From 62faad800a4a68dfbdecc124f369138217877331 Mon Sep 17 00:00:00 2001 From: Etesam Ansari Date: Thu, 21 Jul 2022 17:51:23 -0400 Subject: [PATCH 2/4] =?UTF-8?q?=F0=9F=93=9D=20Updated=20main?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/static_react_task/webapp/src/css/style.css | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/static_react_task/webapp/src/css/style.css b/examples/static_react_task/webapp/src/css/style.css index 55468f1b0..dda6aeb19 100644 --- a/examples/static_react_task/webapp/src/css/style.css +++ b/examples/static_react_task/webapp/src/css/style.css @@ -2,4 +2,5 @@ * Copyright (c) Facebook, Inc. and its affiliates. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. + * touch */ From 23d66d929934f40588d14e51221c9fe383620749 Mon Sep 17 00:00:00 2001 From: Etesam Ansari Date: Fri, 22 Jul 2022 12:37:01 -0400 Subject: [PATCH 3/4] =?UTF-8?q?=E2=9A=A1=EF=B8=8F=20Reduced=20number=20fil?= =?UTF-8?q?ters=20on=20mnist=20&=20toxicity?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-end-to-end-tests.yml | 4 ++-- examples/static_react_task/webapp/src/css/style.css | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/cypress-end-to-end-tests.yml b/.github/workflows/cypress-end-to-end-tests.yml index 855d47b69..177e50092 100644 --- a/.github/workflows/cypress-end-to-end-tests.yml +++ b/.github/workflows/cypress-end-to-end-tests.yml @@ -142,7 +142,7 @@ jobs: remote_procedure_mnist: needs: changes - if: ${{ (needs.changes.outputs.mnist == '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')}} + if: ${{ (needs.changes.outputs.mnist == 'true') || (needs.changes.outputs.mephisto-task == 'true') }} runs-on: ubuntu-latest steps: - name: 🔀 Checking out repo @@ -188,7 +188,7 @@ jobs: remote_procedure_toxicity_detection: needs: changes - if: ${{ (needs.changes.outputs.toxicity_detection == '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')}} + if: ${{ (needs.changes.outputs.toxicity_detection == 'true') || (needs.changes.outputs.mephisto-task == 'true') }} runs-on: ubuntu-latest steps: - name: 🔀 Checking out repo diff --git a/examples/static_react_task/webapp/src/css/style.css b/examples/static_react_task/webapp/src/css/style.css index dda6aeb19..55468f1b0 100644 --- a/examples/static_react_task/webapp/src/css/style.css +++ b/examples/static_react_task/webapp/src/css/style.css @@ -2,5 +2,4 @@ * Copyright (c) Facebook, Inc. and its affiliates. * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - * touch */ From 4a11a8acb9a92c63ebbe348f79fcbd44b51a6e58 Mon Sep 17 00:00:00 2001 From: Etesam Ansari Date: Tue, 26 Jul 2022 10:28:20 -0400 Subject: [PATCH 4/4] =?UTF-8?q?=F0=9F=92=A1=20Added=20comments=20to=20cypr?= =?UTF-8?q?ess=20github=20action=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/cypress-end-to-end-tests.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cypress-end-to-end-tests.yml b/.github/workflows/cypress-end-to-end-tests.yml index 177e50092..f4fac0ec5 100644 --- a/.github/workflows/cypress-end-to-end-tests.yml +++ b/.github/workflows/cypress-end-to-end-tests.yml @@ -5,9 +5,10 @@ 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 filter step + # 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 }} @@ -21,7 +22,6 @@ jobs: mephisto-task: ${{ steps.filter.outputs.mephisto-task }} mephisto-worker-addons: ${{ steps.filter.outputs.mephisto-worker-addons }} steps: - # For pull requests it's not necessary to checkout the code - uses: actions/checkout@v3 with: fetch-depth: 2 @@ -52,6 +52,7 @@ jobs: 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')}} @@ -96,6 +97,7 @@ 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')}} @@ -230,6 +232,7 @@ 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')}}