Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/ci-ui-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
working-directory: application/CohortManager/src/Web

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Setup Node.js
uses: actions/setup-node@v4
Expand Down
21 changes: 4 additions & 17 deletions .github/workflows/cicd-1-pull-request-devtest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
terraform_version: ${{ steps.variables.outputs.terraform_version }}
environment_tag: ${{ steps.variables.outputs.environment_tag }}
version: ${{ steps.variables.outputs.version }}
does_pull_request_exist: ${{ steps.pr_exists.outputs.does_pull_request_exist }}
does_pull_request_exist: ${{ steps.pr.outputs.does_pull_request_exist }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: 'true'
- name: "Set CI/CD variables"
Expand All @@ -46,7 +46,7 @@ jobs:
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
echo "environment_tag=development" >> $GITHUB_OUTPUT
- name: "Check if pull request exists for this branch"
id: pr_exists
id: pr
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -70,7 +70,7 @@ jobs:
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
export ENVIRONMENT_TAG="${{ steps.variables.outputs.environment_tag }}"
export VERSION="${{ steps.variables.outputs.version }}"
export DOES_PULL_REQUEST_EXIST="${{ steps.pr_exists.outputs.does_pull_request_exist }}"
export DOES_PULL_REQUEST_EXIST="${{ steps.pr.outputs.does_pull_request_exist }}"
make list-variables
commit-stage: # Recommended maximum execution time is 2 minutes
name: "Commit stage"
Expand Down Expand Up @@ -143,19 +143,6 @@ jobs:
function_app_source_code_path: application/CohortManager/src
project_name: cohort-manager
build_all_images: true
acceptance-stage: # Recommended maximum execution time is 10 minutes
name: "Acceptance stage"
needs: [metadata, build-image-stage]
uses: ./.github/workflows/stage-4-acceptance.yaml
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
with:
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
python_version: "${{ needs.metadata.outputs.python_version }}"
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
version: "${{ needs.metadata.outputs.version }}"
deploy-stage:
if: github.event_name == 'push'
name: Deploy DevTest environment for commit ${{ github.sha }}
Expand Down
23 changes: 5 additions & 18 deletions .github/workflows/cicd-1-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,10 @@ jobs:
terraform_version: ${{ steps.variables.outputs.terraform_version }}
environment_tag: ${{ steps.variables.outputs.environment_tag }}
version: ${{ steps.variables.outputs.version }}
does_pull_request_exist: ${{ steps.pr_exists.outputs.does_pull_request_exist }}
does_pull_request_exist: ${{ steps.pr.outputs.does_pull_request_exist }}
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: 'true'
- name: "Set CI/CD variables"
Expand All @@ -47,10 +47,10 @@ jobs:
echo "nodejs_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "python_version=$(grep "^nodejs" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "terraform_version=$(grep "^terraform" .tool-versions | cut -f2 -d' ')" >> $GITHUB_OUTPUT
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
echo "environment_tag=development" >> $GITHUB_OUTPUT
echo "version=$(head -n 1 .version 2> /dev/null || echo unknown)" >> $GITHUB_OUTPUT
- name: "Check if pull request exists for this branch"
id: pr_exists
id: pr
env:
GH_TOKEN: ${{ github.token }}
run: |
Expand All @@ -74,7 +74,7 @@ jobs:
export TERRAFORM_VERSION="${{ steps.variables.outputs.terraform_version }}"
export ENVIRONMENT_TAG="${{ steps.variables.outputs.environment_tag }}"
export VERSION="${{ steps.variables.outputs.version }}"
export DOES_PULL_REQUEST_EXIST="${{ steps.pr_exists.outputs.does_pull_request_exist }}"
export DOES_PULL_REQUEST_EXIST="${{ steps.pr.outputs.does_pull_request_exist }}"
make list-variables
commit-stage: # Recommended maximum execution time is 2 minutes
name: "Commit stage"
Expand Down Expand Up @@ -148,19 +148,6 @@ jobs:
function_app_source_code_path: application/CohortManager/src
project_name: cohort-manager
build_all_images: true
acceptance-stage: # Recommended maximum execution time is 10 minutes
name: "Acceptance stage"
needs: [metadata, build-image-stage]
uses: ./.github/workflows/stage-4-acceptance.yaml
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
with:
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
python_version: "${{ needs.metadata.outputs.python_version }}"
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
version: "${{ needs.metadata.outputs.version }}"
deploy-stage:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
name: Deploy environments for commit ${{ github.sha }}
Expand Down
79 changes: 0 additions & 79 deletions .github/workflows/cicd-3-deploy.yaml

This file was deleted.

27 changes: 6 additions & 21 deletions .github/workflows/stage-1-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to scan all commits
submodules: 'true'
Expand All @@ -54,7 +54,7 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to compare branches
- name: "Check file format"
Expand All @@ -65,7 +65,7 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to compare branches
- name: "Check Markdown format"
Expand All @@ -76,7 +76,7 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0 # Full history is needed to compare branches
- name: "Check English usage"
Expand All @@ -87,7 +87,7 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: "Lint Terraform"
uses: ./.github/actions/lint-terraform
count-lines-of-code:
Expand All @@ -99,24 +99,9 @@ jobs:
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
uses: actions/checkout@v6
- name: "Count lines of code"
uses: ./.github/actions/create-lines-of-code-report
with:
build_datetime: "${{ inputs.build_datetime }}"
build_timestamp: "${{ inputs.build_timestamp }}"
scan-dependencies:
name: "Scan dependencies"
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
timeout-minutes: 2
steps:
- name: "Checkout code"
uses: actions/checkout@v4
# - name: "Scan dependencies"
# uses: ./.github/actions/scan-dependencies
# with:
# build_datetime: "${{ inputs.build_datetime }}"
# build_timestamp: "${{ inputs.build_timestamp }}"
2 changes: 1 addition & 1 deletion .github/workflows/stage-2-analyse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
timeout-minutes: 15
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
Expand Down
24 changes: 5 additions & 19 deletions .github/workflows/stage-2-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:
UNIT_TEST_DIR: ${{ inputs.unit_test_dir }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Check for ConsolidatedTests.csproj
Expand All @@ -89,7 +89,7 @@ jobs:
UNIT_TEST_DIR: ${{ inputs.unit_test_dir }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Create matrix for parallel jobs
Expand All @@ -112,7 +112,7 @@ jobs:
LOGGER_FORMAT: ${{ inputs.unit_test_logger_format }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
Expand Down Expand Up @@ -162,7 +162,7 @@ jobs:
LOGGER_FORMAT: ${{ inputs.unit_test_logger_format }}
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
Expand Down Expand Up @@ -209,7 +209,7 @@ jobs:
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
submodules: true
- name: Setup .NET
Expand Down Expand Up @@ -252,17 +252,3 @@ jobs:
coverage-type: cobertura
coverage-path: coverage/Cobertura.xml
# coverage-threshold: 50

test-lint:
name: Linting
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run linting
run: |
make test-lint
- name: Save the linting result
run: |
echo "Nothing to save"
Loading
Loading