Skip to content

Commit 040df3f

Browse files
committed
feat: testing enabled
1 parent acd75ce commit 040df3f

1 file changed

Lines changed: 49 additions & 49 deletions

File tree

.github/workflows/cicd-1-pull-request-devtest.yaml

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -87,44 +87,44 @@ jobs:
8787
python_version: "${{ needs.metadata.outputs.python_version }}"
8888
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
8989
version: "${{ needs.metadata.outputs.version }}"
90-
# test-stage: # Recommended maximum execution time is 5 minutes
91-
# name: 'Test stage'
92-
# needs: [metadata]
93-
# permissions:
94-
# pull-requests: write
95-
# uses: ./.github/workflows/stage-2-test.yaml
96-
# with:
97-
# unit_test_dir: tests/UnitTests
98-
# app_dir: application/CohortManager
99-
# build_datetime: '${{ needs.metadata.outputs.build_datetime }}'
100-
# build_timestamp: '${{ needs.metadata.outputs.build_timestamp }}'
101-
# build_epoch: '${{ needs.metadata.outputs.build_epoch }}'
102-
# nodejs_version: '${{ needs.metadata.outputs.nodejs_version }}'
103-
# python_version: '${{ needs.metadata.outputs.python_version }}'
104-
# terraform_version: '${{ needs.metadata.outputs.terraform_version }}'
105-
# version: '${{ needs.metadata.outputs.version }}'
106-
# analysis-stage: # Recommended maximum execution time is 5 minutes
107-
# name: "Analysis stage"
108-
# needs: [metadata, commit-stage, test-stage]
109-
# uses: ./.github/workflows/stage-2-analyse.yaml
110-
# permissions:
111-
# contents: read
112-
# id-token: write
113-
# pull-requests: read
114-
# secrets:
115-
# sonar_token: ${{ secrets.SONAR_TOKEN }}
116-
# with:
117-
# unit_test_dir: tests/UnitTests
118-
# build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
119-
# build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
120-
# build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
121-
# nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
122-
# python_version: "${{ needs.metadata.outputs.python_version }}"
123-
# terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
124-
# version: "${{ needs.metadata.outputs.version }}"
90+
test-stage: # Recommended maximum execution time is 5 minutes
91+
name: 'Test stage'
92+
needs: [metadata]
93+
permissions:
94+
pull-requests: write
95+
uses: ./.github/workflows/stage-2-test.yaml
96+
with:
97+
unit_test_dir: tests/UnitTests
98+
app_dir: application/CohortManager
99+
build_datetime: '${{ needs.metadata.outputs.build_datetime }}'
100+
build_timestamp: '${{ needs.metadata.outputs.build_timestamp }}'
101+
build_epoch: '${{ needs.metadata.outputs.build_epoch }}'
102+
nodejs_version: '${{ needs.metadata.outputs.nodejs_version }}'
103+
python_version: '${{ needs.metadata.outputs.python_version }}'
104+
terraform_version: '${{ needs.metadata.outputs.terraform_version }}'
105+
version: '${{ needs.metadata.outputs.version }}'
106+
analysis-stage: # Recommended maximum execution time is 5 minutes
107+
name: "Analysis stage"
108+
needs: [metadata, commit-stage, test-stage]
109+
uses: ./.github/workflows/stage-2-analyse.yaml
110+
permissions:
111+
contents: read
112+
id-token: write
113+
pull-requests: read
114+
secrets:
115+
sonar_token: ${{ secrets.SONAR_TOKEN }}
116+
with:
117+
unit_test_dir: tests/UnitTests
118+
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
119+
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
120+
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
121+
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
122+
python_version: "${{ needs.metadata.outputs.python_version }}"
123+
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
124+
version: "${{ needs.metadata.outputs.version }}"
125125
build-image-stage: # Recommended maximum execution time is 3 minutes
126126
name: "Image build stage"
127-
needs: [metadata] #, test-stage, analysis-stage]
127+
needs: [metadata, test-stage, analysis-stage]
128128
uses: ./.github/workflows/stage-3-build-images-devtest.yaml
129129
permissions:
130130
contents: read
@@ -143,19 +143,19 @@ jobs:
143143
function_app_source_code_path: application/CohortManager/src
144144
project_name: cohort-manager
145145
build_all_images: true
146-
# acceptance-stage: # Recommended maximum execution time is 10 minutes
147-
# name: "Acceptance stage"
148-
# needs: [metadata, build-image-stage]
149-
# uses: ./.github/workflows/stage-4-acceptance.yaml
150-
# if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
151-
# with:
152-
# build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
153-
# build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
154-
# build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
155-
# nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
156-
# python_version: "${{ needs.metadata.outputs.python_version }}"
157-
# terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
158-
# version: "${{ needs.metadata.outputs.version }}"
146+
acceptance-stage: # Recommended maximum execution time is 10 minutes
147+
name: "Acceptance stage"
148+
needs: [metadata, build-image-stage]
149+
uses: ./.github/workflows/stage-4-acceptance.yaml
150+
if: needs.metadata.outputs.does_pull_request_exist == 'true' || (github.event_name == 'pull_request' && (github.event.action == 'opened' || github.event.action == 'reopened'))
151+
with:
152+
build_datetime: "${{ needs.metadata.outputs.build_datetime }}"
153+
build_timestamp: "${{ needs.metadata.outputs.build_timestamp }}"
154+
build_epoch: "${{ needs.metadata.outputs.build_epoch }}"
155+
nodejs_version: "${{ needs.metadata.outputs.nodejs_version }}"
156+
python_version: "${{ needs.metadata.outputs.python_version }}"
157+
terraform_version: "${{ needs.metadata.outputs.terraform_version }}"
158+
version: "${{ needs.metadata.outputs.version }}"
159159
deploy-stage:
160160
if: github.event_name == 'push'
161161
name: Deploy DevTest environment for commit ${{ github.sha }}

0 commit comments

Comments
 (0)