From c1e96c1a0bc207679f4476ee9986e25b4e77b62b Mon Sep 17 00:00:00 2001 From: Peter Harrison <16875803+palisadoes@users.noreply.github.com> Date: Sun, 29 Dec 2024 10:19:08 -0800 Subject: [PATCH] Update pull-request.yml --- .github/workflows/pull-request.yml | 83 +++++++++++++++--------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index edc6a58c7c..4708e39869 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -174,51 +174,50 @@ jobs: echo "- Source branch may be incorrect please use develop as source branch." exit 1 - # Check-ESlint-Disable: - # name: Check for eslint-disable - # runs-on: ubuntu-latest - # steps: - # - name: Checkout code - # uses: actions/checkout@v4 - - # - name: Get changed files - # id: changed-files - # uses: tj-actions/changed-files@v45 - - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: 3.9 - - # - name: Run Python script - # run: | - # python .github/workflows/eslint_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} - - # Check-Code-Coverage-Disable: - # name: Check for code coverage disable - # runs-on: ubuntu-latest - # steps: - # - name: Checkout code - # uses: actions/checkout@v4 + Check-ESlint-Disable: + name: Check for eslint-disable + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 - # - name: Get changed files - # id: changed-files - # uses: tj-actions/changed-files@v45 + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 - # - name: Set up Python - # uses: actions/setup-python@v5 - # with: - # python-version: 3.9 + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 - # - name: Run Python script - # run: | - # python .github/workflows/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} + - name: Run Python script + run: | + python .github/workflows/eslint_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} + + Check-Code-Coverage-Disable: + name: Check for code coverage disable + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Get changed files + id: changed-files + uses: tj-actions/changed-files@v45 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: 3.9 + + - name: Run Python script + run: | + python .github/workflows/code_coverage_disable_check.py --files ${{ steps.changed-files.outputs.all_changed_files }} Test-Application: name: Test Application runs-on: ubuntu-latest - needs: [Code-Quality-Checks] - # needs: [Code-Quality-Checks, Check-ESlint-Disable,Check-Code-Coverage-Disable] + needs: [Code-Quality-Checks, Check-ESlint-Disable,Check-Code-Coverage-Disable] steps: - name: Checkout the Repository uses: actions/checkout@v4 @@ -436,8 +435,8 @@ jobs: name: Test Deployment to https://docs-admin.talawa.io runs-on: ubuntu-latest needs: [Docker-Start-Check, Start-App-Without-Docker] - # Run only if the develop branch and not dependabot - if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop' }} + # Run only if the develop-postgres branch and not dependabot + if: ${{ github.actor != 'dependabot[bot]' && github.event.pull_request.base.ref == 'develop-postgres' }} steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -459,7 +458,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check if the target branch is develop - if: github.event.pull_request.base.ref != 'develop' + if: github.event.pull_request.base.ref != 'develop-postgres' run: | - echo "Error: Pull request target branch must be 'develop'. Please refer PR_GUIDELINES.md" + echo "Error: Pull request target branch must be 'develop-postgres'. Please refer PR_GUIDELINES.md" exit 1