Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 3 additions & 29 deletions .github/workflows/pull_request-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
- '!docs/**'
- 'docs/bpmn-workflow-models/**'
- '!.github/ISSUE_TEMPLATE/**'
workflow_dispatch: null

env:
GH_TOKEN: ${{ github.token }}
Expand Down Expand Up @@ -46,54 +45,29 @@
- './backend/audit/models/**'
- './backend/dissemination/models/**'

check-if-branch-is-ahead-of-main:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: Check if branch is ahead of main
run: |
if ! git merge-base --is-ancestor origin/main ${{ github.event.pull_request.head.sha }};
then echo "This branch is not up to date with main";
gh pr comment ${{ github.event.pull_request.number }} \
--body "This pull request is not up to date with main. Please merge main into this brach or rebase this branch onto main. This PR should not be approved until all status checks pass. If you see this message, please rerun all status checks before merging."
exit 1; fi

# Tests and Linting invoked on a Pull Request
testing-from-build:
needs: [check-for-changes, check-if-branch-is-ahead-of-main]
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.requirements == 'true' || needs.check-for-changes.outputs.dev-requirements == 'true' || needs.check-for-changes.outputs.docker == 'true' || needs.check-for-changes.outputs.package == 'true' || needs.check-for-changes.outputs.staticfiles == 'true' }}
uses: ./.github/workflows/testing-from-build.yml
secrets: inherit

testing-from-ghcr:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
needs: [check-for-changes, check-if-branch-is-ahead-of-main]
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.requirements != 'true' && needs.check-for-changes.outputs.dev-requirements != 'true' && needs.check-for-changes.outputs.docker != 'true' && needs.check-for-changes.outputs.package != 'true' && needs.check-for-changes.outputs.staticfiles != 'true' }}
uses: ./.github/workflows/testing-from-ghcr.yml
secrets: inherit

cypress-from-container:

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
needs: [check-if-branch-is-ahead-of-main]
uses: ./.github/workflows/testing-cypress-container.yml
with:
environment: testing
secrets: inherit

linting:
needs: [check-if-branch-is-ahead-of-main]
uses: ./.github/workflows/pull_request-linting.yml
secrets: inherit

# Update BPMN Diagrams
# We are removing this as we are not editing, and we do not wish for it to run with lib updates.
# Uncomment if changes to models are necessary
# sync-BPMN:
# uses: ./.github/workflows/add-bpmn-renders.yml
# secrets: inherit

# Generate Terraform Plans
terraform-plan:
if: ${{ github.base_ref == 'main' }}
Expand Down Expand Up @@ -141,7 +115,7 @@
if: github.event_name == 'pull_request'

validate-migrations:
needs: [check-for-changes, check-if-branch-is-ahead-of-main]
needs: [check-for-changes]
if: ${{ needs.check-for-changes.outputs.requirements == 'true' || needs.check-for-changes.outputs.migration == 'true' }}
uses: ./.github/workflows/validate-migrations.yml
secrets: inherit

Check warning

Code scanning / CodeQL

Workflow does not contain permissions Medium

Actions job or workflow does not limit the permissions of the GITHUB_TOKEN. Consider setting an explicit permissions block, using the following as a minimal starting point: {}
Loading