✅Unit Testing Status Check (preview branch) #120
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ✅Unit Testing Status Check | |
run-name: ✅Unit Testing Status Check (${{ github.base_ref }} branch) | |
defaults: | |
run: | |
shell: pwsh | |
on: | |
pull_request_target: | |
branches: [main, preview] | |
jobs: | |
get_sdk_version: | |
name: Get SDK Version | |
runs-on: ubuntu-latest | |
outputs: | |
sdk-version: ${{ steps.get-sdk-version.outputs.sdk-version }} | |
steps: | |
- name: Get SDK Version From Environment Variable | |
id: get-sdk-version | |
run: | | |
"sdk-version=${{ vars.NET_SDK_VERSION }}" >> $env:GITHUB_OUTPUT; | |
run_branch_validator_tests: | |
name: Run ${{ vars.PROJECT_NAME }} Tests | |
needs: get_sdk_version | |
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | |
with: | |
project-name: "${{ vars.PROJECT_NAME }}Tests" | |
build-config: Debug | |
net-sdk-version: "${{ needs.get_sdk_version.outputs.sdk-version }}" | |
checkout-ref: ${{ github.event.pull_request.head.ref }} | |
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }} | |
secrets: | |
cicd-pat: ${{ secrets.CICD_TOKEN }} | |
run_branch_validation_shared_tests: | |
name: Run ${{ vars.PROJECT_NAME }}Shared Tests | |
needs: get_sdk_version | |
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | |
with: | |
project-name: "${{ vars.PROJECT_NAME }}SharedTests" | |
build-config: Debug | |
net-sdk-version: "${{ needs.get_sdk_version.outputs.sdk-version }}" | |
checkout-ref: ${{ github.event.pull_request.head.ref }} | |
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }} | |
secrets: | |
cicd-pat: ${{ secrets.CICD_TOKEN }} | |
run_script_generator_tests: | |
name: Run ScriptGenerator Tests | |
needs: get_sdk_version | |
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | |
with: | |
project-name: "ScriptGeneratorTests" | |
build-config: Debug | |
net-sdk-version: "${{ needs.get_sdk_version.outputs.sdk-version }}" | |
checkout-ref: ${{ github.event.pull_request.head.ref }} | |
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }} | |
secrets: | |
cicd-pat: ${{ secrets.CICD_TOKEN }} | |
run_integration_tests: | |
name: Run ${{ vars.PROJECT_NAME }} Integration Tests | |
needs: [run_branch_validator_tests, | |
run_branch_validation_shared_tests, | |
run_script_generator_tests, | |
get_sdk_version] | |
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected] | |
with: | |
project-name: "${{ vars.PROJECT_NAME }}IntegrationTests" | |
build-config: Debug | |
net-sdk-version: "${{ needs.get_sdk_version.outputs.sdk-version }}" | |
checkout-ref: ${{ github.event.pull_request.head.ref }} | |
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }} | |
secrets: | |
cicd-pat: ${{ secrets.CICD_TOKEN }} | |
test_status_check: | |
name: ${{ vars.PROJECT_NAME }} Test Status Check | |
needs: [run_branch_validator_tests, | |
run_branch_validation_shared_tests, | |
run_script_generator_tests, | |
run_integration_tests] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Print Status Check Pass Message | |
run: Write-Host "::notice::✅Test Status Check Passed✅"; |