mirror of
https://github.com/codeflash-ai/codeflash-internal.git
synced 2026-05-04 18:25:18 +00:00
Remove wait-for-prek dependencies from CI workflows
Prek checks should not block other workflows from running. This removes the wait-for-prek jobs entirely so unit tests, e2e tests, and codeflash optimization can run independently of pre-commit checks.
This commit is contained in:
parent
476bbc2305
commit
911f3e6c7b
3 changed files with 8 additions and 58 deletions
18
.github/workflows/codeflash-aiservice.yaml
vendored
18
.github/workflows/codeflash-aiservice.yaml
vendored
|
|
@ -49,23 +49,9 @@ jobs:
|
|||
- name: Skip optimization
|
||||
run: echo "Skipping codeflash optimization - no changes in django/aiservice/"
|
||||
|
||||
wait-for-prek:
|
||||
needs: check-changes
|
||||
if: needs.check-changes.outputs.should-run == 'true'
|
||||
name: Wait for prek checks
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
check-name: prek
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
|
||||
optimize:
|
||||
needs: [check-changes, wait-for-prek]
|
||||
if: always() && needs.check-changes.outputs.should-run == 'true' && github.actor != 'codeflash-ai[bot]'
|
||||
needs: [check-changes]
|
||||
if: needs.check-changes.outputs.should-run == 'true' && github.actor != 'codeflash-ai[bot]'
|
||||
name: Optimize new code in this PR
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
|
|
|
|||
23
.github/workflows/django-unit-tests.yaml
vendored
23
.github/workflows/django-unit-tests.yaml
vendored
|
|
@ -46,26 +46,9 @@ jobs:
|
|||
- name: Skip tests
|
||||
run: echo "Skipping django unit tests - no changes in django/aiservice/"
|
||||
|
||||
wait-for-prek:
|
||||
name: Wait for prek checks
|
||||
needs: check-changes
|
||||
if: needs.check-changes.outputs.should-run == 'true' && github.event_name == 'pull_request'
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
steps:
|
||||
- uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||
check-name: prek
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
|
||||
unit-tests:
|
||||
needs: [check-changes, wait-for-prek]
|
||||
if: |
|
||||
always() &&
|
||||
needs.check-changes.outputs.should-run == 'true' &&
|
||||
(needs.wait-for-prek.result == 'success' || needs.wait-for-prek.result == 'skipped' || needs.wait-for-prek.result == 'failure')
|
||||
needs: [check-changes]
|
||||
if: needs.check-changes.outputs.should-run == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
|
|
@ -97,7 +80,7 @@ jobs:
|
|||
|
||||
django-unit-tests-status:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-changes, no-aiservice-changes, wait-for-prek, unit-tests]
|
||||
needs: [check-changes, no-aiservice-changes, unit-tests]
|
||||
if: always()
|
||||
defaults:
|
||||
run:
|
||||
|
|
|
|||
25
.github/workflows/end-to-end-tests.yaml
vendored
25
.github/workflows/end-to-end-tests.yaml
vendored
|
|
@ -50,28 +50,10 @@ jobs:
|
|||
- name: Mark as success
|
||||
run: exit 0
|
||||
|
||||
prek-check:
|
||||
name: Wait for prek checks
|
||||
needs: check-changes
|
||||
if: ${{ github.event_name == 'pull_request' && needs.check-changes.outputs.should_run == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: true
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
checks: read
|
||||
steps:
|
||||
- uses: lewagon/wait-on-check-action@v1.3.4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
check-name: prek
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
wait-interval: 10
|
||||
|
||||
unit-tests-check:
|
||||
name: Wait for unit tests
|
||||
needs: [check-changes, prek-check]
|
||||
if: ${{ always() && github.event_name == 'pull_request' && needs.check-changes.outputs.aiservice_changed == 'true' }}
|
||||
needs: [check-changes]
|
||||
if: ${{ github.event_name == 'pull_request' && needs.check-changes.outputs.aiservice_changed == 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
|
|
@ -210,7 +192,7 @@ jobs:
|
|||
e2e-status:
|
||||
name: E2E Tests Status
|
||||
runs-on: ubuntu-latest
|
||||
needs: [check-changes, no-changes-detected, prek-check, unit-tests-check, e2e-test]
|
||||
needs: [check-changes, no-changes-detected, unit-tests-check, e2e-test]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Check all job statuses
|
||||
|
|
@ -223,7 +205,6 @@ jobs:
|
|||
else
|
||||
echo "✗ End-to-end tests workflow failed"
|
||||
echo "no-changes-detected: ${{ needs.no-changes-detected.result }}"
|
||||
echo "prek-check: ${{ needs.prek-check.result }}"
|
||||
echo "unit-tests-check: ${{ needs.unit-tests-check.result }}"
|
||||
echo "e2e-test: ${{ needs.e2e-test.result }}"
|
||||
exit 1
|
||||
|
|
|
|||
Loading…
Reference in a new issue