Skip to content

Commit

Permalink
Fix Upgrade CI (#1007)
Browse files Browse the repository at this point in the history
## Description

This PR updates the upgrade sample CI to use init-windows instead of
react-native-windows-init.

### Why
To re-enable the CI.

## Screenshots
N/A

###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/react-native-windows-samples/pull/1007)
  • Loading branch information
jonthysell authored Feb 4, 2025
1 parent b264808 commit 5c737a5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ci-upgrade.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
strategy:
fail-fast: false
matrix:
sampleName: ['Calculator\cppwinrt', 'Calculator\csharp', Calculator\fabric]
sampleName: ['Calculator\cppwinrt', 'Calculator\csharp', 'Calculator\fabric']
configuration: ['Debug', 'Release']
platform: ['x86', 'x64', 'ARM64']
reactNativeWindowsVersion: [latest, preview, canary]
Expand All @@ -33,15 +33,14 @@ jobs:
configuration: ${{ matrix.configuration }}
platform: ${{ matrix.platform }}
runInitWindows: true
extraInitWindowsArgs: --language ${{ endsWith(matrix.sampleName, 'cppwinrt') && 'cpp' || 'cs' }}

call-upgradesample-native-module-sample:
name: Upgrade Native Module Sample
needs: setupcheck
strategy:
fail-fast: false
matrix:
sampleName: ['NativeModuleSample\cppwinrt', 'NativeModuleSample\csharp']
sampleName: ['NativeModuleSample\cpp-lib', 'NativeModuleSample\cppwinrt', 'NativeModuleSample\csharp']
configuration: ['Debug', 'Release']
platform: ['x86', 'x64', 'ARM64']
reactNativeWindowsVersion: [latest, preview, canary]
Expand All @@ -52,4 +51,4 @@ jobs:
configuration: ${{ matrix.configuration }}
platform: ${{ matrix.platform }}
extraRunWindowsArgs: --no-autolink --no-deploy
# runCodeGenCheck: true # Enable once we get https://github.com/microsoft/react-native-windows/pull/11187 (Maybe 0.72?)
runCodeGenCheck: true
4 changes: 2 additions & 2 deletions .github/workflows/template-upgradesample.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ jobs:
run: ${{github.workspace}}\.github\scripts\UpgradeSmokeTest.ps1 ${{ inputs.reactNativeWindowsVersion }} -Force ${{ format('${0}', contains(inputs.reactNativeWindowsVersion, 'canary')) }}
working-directory: ..\..\src

- name: Run react-native-windows-init
- name: Run react-native init-windows
if: ${{ steps.upgrade.outcome == 'success' && inputs.runInitWindows }}
run: npx react-native-windows-init --overwrite ${{ inputs.extraInitWindowsArgs }} --version ${{ inputs.reactNativeWindowsVersion }}
run: npx react-native init-windows --logging --overwrite ${{ inputs.extraInitWindowsArgs }}
working-directory: ..\..\src

- name: Codegen check
Expand Down

0 comments on commit 5c737a5

Please sign in to comment.