From 54145369f48b45447bfcf56da88c1a5850476293 Mon Sep 17 00:00:00 2001 From: Ankush Menat Date: Mon, 27 Apr 2026 17:34:29 +0530 Subject: [PATCH] ci: remove a lot of dead CI code (#38940) - Selectively upload coverage only when captured --- .github/workflows/_base-server-tests.yml | 14 +++-------- .github/workflows/server-tests.yml | 22 ----------------- .github/workflows/ui-tests.yml | 31 ------------------------ 3 files changed, 3 insertions(+), 64 deletions(-) diff --git a/.github/workflows/_base-server-tests.yml b/.github/workflows/_base-server-tests.yml index 42f7fa1e11..6711a7821f 100644 --- a/.github/workflows/_base-server-tests.yml +++ b/.github/workflows/_base-server-tests.yml @@ -33,13 +33,6 @@ on: jobs: - unit-test: - name: Unit - runs-on: ubuntu-latest - steps: - - id: placeholder - run: | - echo "Evolution towards a set of (fast) unit tests which run without a DB connection is being planned" gen-idx-integration: name: Gen Integration Test Matrix runs-on: ubuntu-latest @@ -119,7 +112,7 @@ jobs: - name: Upload coverage data uses: actions/upload-artifact@v7 - if: inputs.enable-coverage + if: ${{ inputs.fake-success == false && inputs.enable-coverage }} with: name: coverage-${{ matrix.db }}-${{ matrix.index }} path: ./sites/*coverage*.xml @@ -142,15 +135,14 @@ jobs: # TIP: Use these for checks, e.g. Server / Tests / Success success: name: Success - needs: [unit-test, integration-test] + needs: [integration-test] if: always() runs-on: ubuntu-latest steps: - - name: Unit '${{ needs.unit-test.result }}' / Integration '${{ needs.integration-test.result }}' + - name: Integration '${{ needs.integration-test.result }}' shell: python run: | stati = [ - '${{ needs.unit-test.result }}', '${{ needs.integration-test.result }}', ] diff --git a/.github/workflows/server-tests.yml b/.github/workflows/server-tests.yml index ad69a93a83..3c880ba801 100644 --- a/.github/workflows/server-tests.yml +++ b/.github/workflows/server-tests.yml @@ -1,8 +1,6 @@ name: Server on: - repository_dispatch: - types: [frappe-framework-change] pull_request: workflow_dispatch: schedule: @@ -74,23 +72,3 @@ jobs: fail_ci_if_error: true verbose: true flags: server - - dispatch: - name: Downstream - runs-on: "ubuntu-latest" - needs: [test, migrate] - if: ${{ contains( github.event.pull_request.labels.*.name, 'trigger-downstream-ci') }} - strategy: - matrix: - repo: - - frappe/erpnext - - frappe/lending - - frappe/hrms - steps: - - name: Dispatch Downstream CI (if supported) - uses: peter-evans/repository-dispatch@v4 - with: - token: ${{ secrets.CI_PAT }} - repository: ${{ matrix.repo }} - event-type: frappe-framework-change - client-payload: '{"frappe_sha": "${{ github.sha }}"}' diff --git a/.github/workflows/ui-tests.yml b/.github/workflows/ui-tests.yml index f112577021..b5fc1afc4f 100644 --- a/.github/workflows/ui-tests.yml +++ b/.github/workflows/ui-tests.yml @@ -2,8 +2,6 @@ name: UI on: pull_request: - repository_dispatch: - types: [frappe-framework-change] workflow_dispatch: schedule: # Run everday at midnight UTC / 5:30 IST @@ -47,32 +45,3 @@ jobs: enable-coverage: false fake-success: ${{ needs.checkrun.outputs.build != 'strawberry' }} needs: checkrun - - coverage: - name: Coverage Wrap Up - needs: [test, checkrun] - if: ${{ needs.checkrun.outputs.build == 'strawberry' }} - runs-on: ubuntu-latest - steps: - - name: Clone - uses: actions/checkout@v6 - - name: Download artifacts - uses: actions/download-artifact@v8.0.1 - - name: Upload python coverage data - uses: codecov/codecov-action@v6 - with: - name: UIBackend - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - verbose: true - exclude: coverage-js* - flags: server-ui - - name: Upload JS coverage data - uses: codecov/codecov-action@v6 - with: - name: Cypress - token: ${{ secrets.CODECOV_TOKEN }} - fail_ci_if_error: true - exclude: coverage-py* - verbose: true - flags: ui-tests