From 162c8554d8fdc4e6f005424bc240e090dd7d34b9 Mon Sep 17 00:00:00 2001 From: Saga4 Date: Sun, 13 Apr 2025 12:43:15 +0530 Subject: [PATCH 1/2] try fix with env variable --- .../end-to-end-topological-sort-test.yaml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/end-to-end-topological-sort-test.yaml b/.github/workflows/end-to-end-topological-sort-test.yaml index 81ebe31ae..e2457c336 100644 --- a/.github/workflows/end-to-end-topological-sort-test.yaml +++ b/.github/workflows/end-to-end-topological-sort-test.yaml @@ -11,13 +11,14 @@ on: jobs: topological-sort-optimization: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod From 19945774f3e520ee31e670cc1846ef0d23746ed1 Mon Sep 17 00:00:00 2001 From: Saga4 Date: Sun, 13 Apr 2025 12:49:00 +0530 Subject: [PATCH 2/2] added folded block notation to other yaml files --- .github/workflows/codeflash-optimize.yaml | 15 ++++++++------- .../end-to-end-test-bubblesort-pytest-no-git.yaml | 15 ++++++++------- .../end-to-end-test-bubblesort-unittest.yaml | 15 ++++++++------- .github/workflows/end-to-end-test-coverage.yaml | 15 ++++++++------- .../workflows/end-to-end-test-futurehouse.yaml | 15 ++++++++------- .github/workflows/end-to-end-test-init-optim.yaml | 15 ++++++++------- .../workflows/end-to-end-test-tracer-replay.yaml | 15 ++++++++------- 7 files changed, 56 insertions(+), 49 deletions(-) diff --git a/.github/workflows/codeflash-optimize.yaml b/.github/workflows/codeflash-optimize.yaml index df4fef892..582707a82 100644 --- a/.github/workflows/codeflash-optimize.yaml +++ b/.github/workflows/codeflash-optimize.yaml @@ -15,13 +15,14 @@ jobs: optimize: name: Optimize new Python code # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors' : '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} if: ${{ github.actor != 'codeflash-ai[bot]' }} runs-on: ubuntu-latest env: diff --git a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml index d03ae9085..0b504de68 100644 --- a/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-pytest-no-git.yaml @@ -11,13 +11,14 @@ on: jobs: bubble-sort-optimization-pytest-no-git: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod diff --git a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml index 4ff2d4f1e..16ed73718 100644 --- a/.github/workflows/end-to-end-test-bubblesort-unittest.yaml +++ b/.github/workflows/end-to-end-test-bubblesort-unittest.yaml @@ -11,13 +11,14 @@ on: jobs: bubble-sort-optimization-unittest: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod diff --git a/.github/workflows/end-to-end-test-coverage.yaml b/.github/workflows/end-to-end-test-coverage.yaml index 23117a797..d8855c0e6 100644 --- a/.github/workflows/end-to-end-test-coverage.yaml +++ b/.github/workflows/end-to-end-test-coverage.yaml @@ -11,13 +11,14 @@ on: jobs: end-to-end-test-coverage: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod diff --git a/.github/workflows/end-to-end-test-futurehouse.yaml b/.github/workflows/end-to-end-test-futurehouse.yaml index af4b9a3a8..6d4148c94 100644 --- a/.github/workflows/end-to-end-test-futurehouse.yaml +++ b/.github/workflows/end-to-end-test-futurehouse.yaml @@ -11,13 +11,14 @@ on: jobs: futurehouse-structure: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod diff --git a/.github/workflows/end-to-end-test-init-optim.yaml b/.github/workflows/end-to-end-test-init-optim.yaml index 69a3a8dee..9e28e4391 100644 --- a/.github/workflows/end-to-end-test-init-optim.yaml +++ b/.github/workflows/end-to-end-test-init-optim.yaml @@ -10,13 +10,14 @@ on: jobs: init-optimization: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod diff --git a/.github/workflows/end-to-end-test-tracer-replay.yaml b/.github/workflows/end-to-end-test-tracer-replay.yaml index 5dd8f975a..8062ad8e2 100644 --- a/.github/workflows/end-to-end-test-tracer-replay.yaml +++ b/.github/workflows/end-to-end-test-tracer-replay.yaml @@ -10,13 +10,14 @@ on: jobs: tracer-replay: # Dynamically determine if environment is needed only when workflow files change and contributor is external - environment: ${{ - github.event_name == 'workflow_dispatch' || - contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && - github.event.pull_request.user.login != 'misrasaurabh1' && - github.event.pull_request.user.login != 'KRRT7' - ? 'external-trusted-contributors': '' - }} + environment: >- + ${{ + github.event_name == 'workflow_dispatch' || + contains(toJSON(github.event.pull_request.files.*.filename), '.github/workflows/') && + github.event.pull_request.user.login != 'misrasaurabh1' && + github.event.pull_request.user.login != 'KRRT7' + ? 'external-trusted-contributors': '' + }} runs-on: ubuntu-latest env: CODEFLASH_AIS_SERVER: prod