Skip to content

Commit

Permalink
Merge branch 'preview' into renovate/xunit-dotnet-monorepo
Browse files Browse the repository at this point in the history
  • Loading branch information
CalvinWilkinson authored Oct 9, 2023
2 parents 76a8886 + b175e14 commit cec24fc
Show file tree
Hide file tree
Showing 9 changed files with 36 additions and 18 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/add-new-item-to-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
add_new_issue_to_project:
name: Add New Issue
needs: get_item_number
uses: KinsonDigital/Infrastructure/.github/workflows/add-item-to-project.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/add-item-to-project.yml@v13.1.0
with:
org-name: "${{ vars.ORGANIZATION_NAME }}"
org-project-name: "${{ vars.ORG_PROJECT_NAME }}"
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,24 @@ on:
jobs:
build_main_project:
name: ${{ vars.PROJECT_NAME }} Build Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.1.0
with:
project-name: "${{ vars.PROJECT_NAME }}"
build-config: Debug
net-sdk-version: "${{ vars.NET_SDK_VERSION }}"
checkout-ref: ${{ github.event.pull_request.head.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}


build_testing_app:
name: ${{ vars.PROJECT_NAME }} Build Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/build-csharp-project.yml@v13.1.0
with:
project-name: "${{ vars.PROJECT_NAME }}Testing"
build-config: Debug
net-sdk-version: "${{ vars.NET_SDK_VERSION }}"
checkout-ref: ${{ github.event.pull_request.head.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}


build_status_check:
Expand Down
9 changes: 6 additions & 3 deletions .github/workflows/prepare-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,29 +32,32 @@ jobs:
- name: Validate Workflow Inputs
run: |
$releaseType = "${{ inputs.release-type }}".ToLower();
if ("${{ vars.PROJECT_NAME }}".Trim() -eq "") {
Write-Host "::error::The project name input cannot be empty.";
exit 1;
}
if ($releaseType -eq "") {
Write-Host "::error::The release type input cannot be empty.";
exit 1;
}
if ($releaseType -ne 'preview' -and $releaseType -ne 'production') {
Write-Host "::error::The release type input must be either 'Preview' or 'Production'.";
exit 1;
}
$releaseVersion = "${{ inputs.release-version }}".Trim().ToLower();
if ($releaseVersion -eq "") {
Write-Host "::error::The 'release-version' workflow input cannot be empty.";
exit 1;
}
$prodVersionRegex = "v[0-9]+\.[0-9]+\.[0-9]+";
$prevVersionRegex = "v[0-9]+\.[0-9]+\.[0-9]+-preview\.[0-9]+";
Expand All @@ -71,7 +74,7 @@ jobs:
prepare_release:
name: Prepare ${{ inputs.release-type }} Release Of ${{ vars.PROJECT_NAME }}
needs: print_validate_workflow
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/prepare-release.yml@v13.1.0
with:
project-name: "${{ vars.PROJECT_NAME }}"
release-type: "${{ inputs.release-type }}"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run_release:
name: Performing ${{ inputs.release-type }} Release of ${{ vars.PROJECT_NAME }} (${{ inputs.release-type == 'Production' && 'Release' || 'Debug' }})
needs: determine_release_notes_path
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-lib-release.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/dotnet-lib-release.yml@v13.1.0
with:
project-name: "${{ vars.PROJECT_NAME}}"
release-type: "${{ inputs.release-type }}"
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/sync-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
sync_bot:
name: Sync Bot Status Check
name: Sync Bot
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
Expand All @@ -32,20 +32,21 @@ jobs:
Write-Host "::notice::Issue: $issueNumber";
if ($manuallyExecuted -and $issueNumber -eq "0") {
Write-Host "::notice::The issue or PR number must be a value greater than 0.";
Write-Host "::error::The issue or PR number must be a value greater than 0.";
exit 1;
}
<# Deno Args:
1. Organization name
2. Project name
3. Issue number
4. Event Type - set to issue event type
4. Event type - set to issue event type
5. PAT
#>
deno run `
--allow-net `
"$scriptUrl" `
"${{ vars.ORGANIZATION_NAME }}" `
"${{ vars.PROJECT_NAME }}" `
"$issueNumber" `
"issue" `
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/sync-pr-to-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ on:
jobs:
initial_sync:
name: Start Initial Sync
if: ${{ github.event_name == 'pull_request_target' }}
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
if: |
github.event_name == 'pull_request_target' &&
!startsWith(github.base_ref, 'renovate/')
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.pull_request.number }}
sync-type: initial
Expand All @@ -29,8 +31,11 @@ jobs:

manual_sync:
name: Start Manual Sync
if: ${{ github.event_name == 'issue_comment' && contains(github.event.comment.body, '[run-sync]') }}
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
if: |
github.event_name == 'issue_comment' &&
contains(github.event.comment.body, '[run-sync]') &&
!startsWith(github.base_ref, 'renovate/')
uses: KinsonDigital/Infrastructure/.github/workflows/[email protected]
with:
issue-or-pr-number: ${{ github.event.issue.number }}
sync-type: manual
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/sync-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,19 @@ on:
jobs:
sync_status_check:
name: Sync Status Check
if: startsWith(github.head_ref, 'feature/')
runs-on: ubuntu-latest
steps:
- name: Set Up Deno
uses: denoland/setup-deno@v1
with:
deno-version: ${{ vars.DENO_VERSION }}

- name: Pass Workflow If Renovate
if: startsWith(github.head_ref, 'renovate/')
run: Write-Host "::notice::Renovate PR detected. Skipping sync status check.";

- name: Run Sync Status Check
if: startsWith(github.head_ref, 'feature/')
run: |
$scriptUrl = "${{ vars.SCRIPT_BASE_URL }}/${{ vars.CICD_SCRIPTS_VERSION }}/${{ vars.SCRIPT_RELATIVE_DIR_PATH}}/sync-bot-status-check.ts";
$prNumber = "${{ github.event.number }}";
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/unit-test-status-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,17 @@ run-name: ✅Unit Testing Status Check (${{ github.base_ref }} branch)


on:
workflow_dispatch:
pull_request_target:
branches: [main, preview]


jobs:
run_tests:
name: ${{ vars.PROJECT_NAME }} Test Status Check
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v13.0.0
uses: KinsonDigital/Infrastructure/.github/workflows/run-csharp-tests.yml@v13.1.0
with:
project-name: "${{ vars.PROJECT_NAME }}Tests"
build-config: Debug
net-sdk-version: "${{ vars.NET_SDK_VERSION }}"
checkout-ref: ${{ github.event.pull_request.head.ref }}
checkout-repository: ${{ github.event.pull_request.head.repo.full_name }}
2 changes: 1 addition & 1 deletion Testing/PlazmaTests/PlazmaTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NSubstitute" Version="5.0.0" />
<PackageReference Include="NSubstitute" Version="5.1.0" />
<PackageReference Include="NSubstitute.Analyzers.CSharp" Version="1.0.16">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
Expand Down

0 comments on commit cec24fc

Please sign in to comment.