Skip to content

Commit

Permalink
Fix CI pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
jonthysell committed Nov 21, 2024
1 parent 0fdf33a commit 1d38c00
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 53 deletions.
31 changes: 6 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,40 +30,21 @@ jobs:
strategy:
fail-fast: false
matrix:
rnwVersion: [ 'latest', '0.72-stable', '0.71-stable'] # test *all* versions that use VS 2022. aka any RNW version >= min in package.json and >= 0.71
rnwVersion: [ '0-73-stable', '0.72-stable', '0.71-stable'] # test *all* versions that use VS 2022. aka any RNW version >= min in package.json and >= 0.71
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
include:
- rnwVersion: 'latest'
rnTemplate: 'react-native@latest'
- rnwVersion: '0-73-stable'
rnVersion: 'react-native@0-73-stable'
- rnwVersion: '0.72-stable'
rnTemplate: '[email protected]'
rnVersion: '[email protected]'
- rnwVersion: '0.71-stable'
rnTemplate: '[email protected]'
rnVersion: '[email protected]'
uses: ./.github/workflows/template-testcli.yml
with:
vmImage: windows-2022
rnwVersion: ${{ matrix.rnwVersion }}
useRnwNuGet: ${{ matrix.useRnwNuGet }}
rnTemplate: ${{ matrix.rnTemplate }}

call-testcli-old:
name: Test CLI (VS 2019)
strategy:
fail-fast: false
matrix:
rnwVersion: ['0.70-stable', '0.69-stable'] # test *all* versions that use VS 2019. aka any RNW version >= min in package.json and < 0.71
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
include:
- rnwVersion: '0.70-stable'
rnTemplate: '[email protected]'
- rnwVersion: '0.69-stable'
rnTemplate: '[email protected]'
uses: ./.github/workflows/template-testcli.yml
with:
vmImage: windows-2019
rnwVersion: ${{ matrix.rnwVersion }}
useRnwNuGet: ${{ matrix.useRnwNuGet }}
rnTemplate: ${{ matrix.rnTemplate }}
rnVersion: ${{ matrix.rnVersion }}

call-buildnpmpackage:
name: Build NPM Package
Expand Down
30 changes: 6 additions & 24 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,37 +42,19 @@ jobs:
strategy:
fail-fast: true
matrix:
rnwVersion: ['latest', '0.72-stable'] # test *key* versions that use VS 2022. aka any RNW version >= 0.71 used by supported partners and/or Active/Maintenance from https://microsoft.github.io/react-native-windows/support
rnwVersion: ['0-73-stable', '0.72-stable'] # test *key* versions that use VS 2022. aka any RNW version >= 0.71 used by supported partners and/or Active/Maintenance from https://microsoft.github.io/react-native-windows/support
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
include:
- rnwVersion: 'latest'
rnTemplate: 'react-native@latest'
- rnwVersion: '0-73-stable'
rnVersion: '0-73-stable'
- rnwVersion: '0.72-stable'
rnTemplate: 'react-native@0.72-stable'
rnVersion: '0.72-stable'
uses: ./.github/workflows/template-testcli.yml
with:
vmImage: windows-2022
rnwVersion: ${{ matrix.rnwVersion }}
useRnwNuGet: ${{ matrix.useRnwNuGet }}
rnTemplate: ${{ matrix.rnTemplate }}

call-testcli-old:
name: Test CLI (VS 2019)
needs: setupcheck
strategy:
fail-fast: true
matrix:
rnwVersion: ['0.69-stable'] # test *key* versions that use VS 2019. aka any RNW version < 0.71 that are used by supported partners
useRnwNuGet: [false, true] # test building with both RNW source and RNW NuGet
include:
- rnwVersion: '0.69-stable'
rnTemplate: '[email protected]'
uses: ./.github/workflows/template-testcli.yml
with:
vmImage: windows-2019
rnwVersion: ${{ matrix.rnwVersion }}
useRnwNuGet: ${{ matrix.useRnwNuGet }}
rnTemplate: ${{ matrix.rnTemplate }}
rnVersion: ${{ matrix.rnVersion }}

call-buildnpmpackage:
name: Build NPM Package
Expand All @@ -98,6 +80,6 @@ jobs:
prcheck:
name: Successful PR Check
runs-on: ubuntu-latest
needs: [setupcheck, call-runcodegen, call-testcli, call-testcli-old, call-buildnpmpackage, call-buildrnx]
needs: [setupcheck, call-runcodegen, call-testcli, call-buildnpmpackage, call-buildrnx]
steps:
- uses: actions/checkout@v3
12 changes: 8 additions & 4 deletions .github/workflows/template-testcli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ on:
required: false
default: false
type: boolean
rnTemplate:
rnVersion:
required: false
default: 'react-native@latest'
default: 'latest'
type: string

jobs:
Expand All @@ -37,10 +37,14 @@ jobs:
run: yarn link
working-directory: package

- name: create react-native@${{ inputs.rnwVersion }} app
run: npx react-native init testrnx --template ${{ inputs.rnTemplate }}
- name: create react-native@${{ inputs.rnVersion }} app
run: npx @react-native-community/cli init testrnx --version ${{ inputs.rnVersion }} --skip-install --install-pods false --verbose --skip-git-init true
working-directory: ../

- name: yarn install
run: yarn install
working-directory: ../testrnx

- name: add Windows (RNW via ${{ inputs.useRnwNuGet && 'NuGet' || 'Source' }})
run: npx react-native-windows-init --overwrite ${{ inputs.useRnwNuGet && '--experimentalNuGetDependency true' || '' }}
working-directory: ../testrnx
Expand Down

0 comments on commit 1d38c00

Please sign in to comment.