From 130746df1501a2662929ae5bf3519960264d44cf Mon Sep 17 00:00:00 2001 From: Timothy Costigan <156176839+costigt-dev@users.noreply.github.com> Date: Fri, 8 Mar 2024 10:55:21 +0000 Subject: [PATCH] Improve/test trigger (#3) * created skeleton of new workflow * simplified skeleton for testing * replaced review_requested action with issue_comment one so tests don't run when adding reviewers * changed to single quotes * replaced double quotes with single quotes --- .github/workflows/base.yml.template | 3 --- .github/workflows/base_reduced.yml.template | 1 - .github/workflows/develop_install.yml | 7 +++---- .github/workflows/end_to_end.yml | 8 +++----- .github/workflows/examples_pytest.yml | 8 +++----- .github/workflows/finn_integration.yml | 8 +++----- .github/workflows/notebook.yml | 8 +++----- .github/workflows/ort_integration.yml | 8 +++----- .github/workflows/pre_commit.yml | 2 -- .github/workflows/pytest.yml | 8 +++----- .github/workflows/reduced_develop_install.yml | 6 +++--- .github/workflows/reduced_end_to_end.yml | 6 +++--- .github/workflows/reduced_examples_pytest.yml | 6 +++--- .github/workflows/reduced_finn_integration.yml | 6 +++--- .github/workflows/reduced_notebook.yml | 6 +++--- .github/workflows/reduced_ort_integration.yml | 6 +++--- .github/workflows/reduced_pytest.yml | 6 +++--- 17 files changed, 42 insertions(+), 61 deletions(-) diff --git a/.github/workflows/base.yml.template b/.github/workflows/base.yml.template index bf296e597..d7137e9c6 100644 --- a/.github/workflows/base.yml.template +++ b/.github/workflows/base.yml.template @@ -3,9 +3,6 @@ name: &{name} on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested jobs: build: diff --git a/.github/workflows/base_reduced.yml.template b/.github/workflows/base_reduced.yml.template index c50903499..ed1fea684 100644 --- a/.github/workflows/base_reduced.yml.template +++ b/.github/workflows/base_reduced.yml.template @@ -6,7 +6,6 @@ on: - opened - reopened - synchronize - - ready_for_review jobs: diff --git a/.github/workflows/develop_install.yml b/.github/workflows/develop_install.yml index eff4e15b0..c08fc9e35 100644 --- a/.github/workflows/develop_install.yml +++ b/.github/workflows/develop_install.yml @@ -3,9 +3,8 @@ name: Test develop install on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -22,7 +21,7 @@ jobs: - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/end_to_end.yml b/.github/workflows/end_to_end.yml index 98d1a309e..963e9a6a1 100644 --- a/.github/workflows/end_to_end.yml +++ b/.github/workflows/end_to_end.yml @@ -3,9 +3,8 @@ name: Test End-to-end flows on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -24,8 +23,7 @@ jobs: - platform: 'windows-latest' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/examples_pytest.yml b/.github/workflows/examples_pytest.yml index 31ccb3ffa..dbbe61e76 100644 --- a/.github/workflows/examples_pytest.yml +++ b/.github/workflows/examples_pytest.yml @@ -3,9 +3,8 @@ name: Examples Pytest on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -26,8 +25,7 @@ jobs: jit_status: 'jit_enabled' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/finn_integration.yml b/.github/workflows/finn_integration.yml index 19becbe70..fea41278b 100644 --- a/.github/workflows/finn_integration.yml +++ b/.github/workflows/finn_integration.yml @@ -3,9 +3,8 @@ name: Test Brevitas-FINN integration on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -21,8 +20,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/notebook.yml b/.github/workflows/notebook.yml index fd079b0ca..7c1b97075 100644 --- a/.github/workflows/notebook.yml +++ b/.github/workflows/notebook.yml @@ -3,9 +3,8 @@ name: Test Notebook execution on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -24,8 +23,7 @@ jobs: - platform: 'macos-latest' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/ort_integration.yml b/.github/workflows/ort_integration.yml index 7d0eccb27..71f958ba7 100644 --- a/.github/workflows/ort_integration.yml +++ b/.github/workflows/ort_integration.yml @@ -3,9 +3,8 @@ name: Test Brevitas-ORT integration on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -21,8 +20,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/pre_commit.yml b/.github/workflows/pre_commit.yml index 719f1e769..08f361078 100644 --- a/.github/workflows/pre_commit.yml +++ b/.github/workflows/pre_commit.yml @@ -8,8 +8,6 @@ on: - opened - reopened - synchronize - - ready_for_review - - review_requested jobs: pre_commit: diff --git a/.github/workflows/pytest.yml b/.github/workflows/pytest.yml index 3d9f43ea9..05ed1d14c 100644 --- a/.github/workflows/pytest.yml +++ b/.github/workflows/pytest.yml @@ -3,9 +3,8 @@ name: Pytest on: push: branches: [ master, dev ] - pull_request: - types: - - review_requested + issue_comment: + types: [created] jobs: build: @@ -26,8 +25,7 @@ jobs: jit_status: 'jit_enabled' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_develop_install.yml b/.github/workflows/reduced_develop_install.yml index 8d2c1b45a..b92314f2a 100644 --- a/.github/workflows/reduced_develop_install.yml +++ b/.github/workflows/reduced_develop_install.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -23,8 +24,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_end_to_end.yml b/.github/workflows/reduced_end_to_end.yml index d19469ef6..72b441f51 100644 --- a/.github/workflows/reduced_end_to_end.yml +++ b/.github/workflows/reduced_end_to_end.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -26,8 +27,7 @@ jobs: - platform: 'windows-latest' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_examples_pytest.yml b/.github/workflows/reduced_examples_pytest.yml index c10aa1c74..975e5d4fe 100644 --- a/.github/workflows/reduced_examples_pytest.yml +++ b/.github/workflows/reduced_examples_pytest.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -24,8 +25,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_finn_integration.yml b/.github/workflows/reduced_finn_integration.yml index c7ebafe8c..5839e685d 100644 --- a/.github/workflows/reduced_finn_integration.yml +++ b/.github/workflows/reduced_finn_integration.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -23,8 +24,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_notebook.yml b/.github/workflows/reduced_notebook.yml index a7293e4d3..91b26b1b0 100644 --- a/.github/workflows/reduced_notebook.yml +++ b/.github/workflows/reduced_notebook.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -26,8 +27,7 @@ jobs: - platform: 'macos-latest' - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_ort_integration.yml b/.github/workflows/reduced_ort_integration.yml index 1671d6a13..b6a604f6d 100644 --- a/.github/workflows/reduced_ort_integration.yml +++ b/.github/workflows/reduced_ort_integration.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -23,8 +24,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo diff --git a/.github/workflows/reduced_pytest.yml b/.github/workflows/reduced_pytest.yml index 12e3d360c..cb9d40daf 100644 --- a/.github/workflows/reduced_pytest.yml +++ b/.github/workflows/reduced_pytest.yml @@ -6,7 +6,8 @@ on: - opened - reopened - synchronize - - ready_for_review + issue_comment: + types: [created] jobs: @@ -24,8 +25,7 @@ jobs: - - if: ${{ !github.event.pull_request.draft }} + if: ${{ !github.event.pull_request.draft && (github.event_name != 'issue_comment' || (github.event.issue.pull_request != '' && contains(github.event.comment.body, '/run-tests')))}} steps: - name: Checkout repo