Skip to content

Commit cbc318a

Browse files
authored
Create template-testcli.yml
1 parent def333b commit cbc318a

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Test CLI
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
vmImage:
7+
required: true
8+
default: windows-2022
9+
type: choice
10+
options:
11+
- windows-2022
12+
- windows-2019
13+
rnwSource:
14+
required: true
15+
default: Source
16+
type: choice
17+
options:
18+
- Source
19+
- NuGet
20+
rnwVersion:
21+
required: true
22+
default: '^0.71'
23+
type: string
24+
25+
jobs:
26+
testcli:
27+
name: New ${{ inputs.rnwVersion }} RNW App from ${{ inputs.rnwSource }}
28+
runs-on: ${{ inputs.vmImage }}
29+
steps:
30+
- uses: actions/checkout@v2
31+
32+
- name: yarn install
33+
run: yarn install
34+
35+
- name: build TS
36+
run: yarn build
37+
38+
- name: yarn link
39+
run: yarn link
40+
working-directory: package
41+
42+
- name: create ${{ inputs.rnwVersion }} app
43+
run: npx react-native init testrnx --template react-native@${{ inputs.rnwVersion }}
44+
45+
- name: add Windows (RNW via ${{ inputs.rnwSource }})
46+
run: npx react-native-windows-init --overwrite ${{ inputs.rnwSource == 'NuGet' && '--experimentalNuGetDependency true' || '' }}
47+
working-directory: testrnx
48+
49+
- name: link react-native-xaml
50+
run: yarn link react-native-xaml
51+
working-directory: testrnx
52+
53+
- name: add react-native-xaml
54+
run: yarn add react-native-xaml
55+
working-directory: testrnx
56+
57+
- name: autolink
58+
run: npx react-native autolink-windows --logging
59+
working-directory: testrnx
60+
61+
- name: update WinUI package version
62+
run: ..\.github\workflows\SetUpAppForNuget.ps1 ${{ inputs.rnwSource == 'NuGet' && '-UseNuGet' || '' }}
63+
working-directory: testrnx
64+
65+
- name: build app
66+
run: npx react-native run-windows --no-launch --no-deploy --no-packager --logging
67+
working-directory: testrnx

0 commit comments

Comments
 (0)