Skip to content

Commit 79cda8b

Browse files
committed
update action to test yarn templates
Signed-off-by: karthik2804 <[email protected]>
1 parent 75e2f55 commit 79cda8b

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

.github/workflows/test.yaml

+9-6
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,19 @@ jobs:
4343
strategy:
4444
matrix:
4545
os: [ubuntu-latest, macos-latest, windows-latest]
46+
package-manager: [npm, yarn]
4647

4748
steps:
4849
- uses: actions/checkout@v3
4950

50-
- name: Use Node.js 20
51+
- name: Use Node.js 22
5152
uses: actions/setup-node@v3
5253
with:
53-
node-version: 20
54+
node-version: 22
55+
56+
- name: Install Yarn (if needed)
57+
if: matrix.package-manager == 'yarn'
58+
run: npm install -g yarn
5459

5560
- name: Setup `spin`
5661
uses: fermyon/actions/spin/setup@v1
@@ -61,19 +66,17 @@ jobs:
6166
run: spin templates install --dir .
6267

6368
- name: Create new project
64-
run: spin new -t http-ts test-project -a
69+
run: spin new -t http-ts test-project -v package-manager=${{ matrix.package-manager }} -a
6570

6671
- name: Install dependencies of the test project
6772
run: |
6873
cd test-project
69-
npm install
7074
7175
- name: Add new component to project
7276
run: |
7377
cd test-project
74-
spin add -t http-ts new-component -a
78+
spin add -t http-ts new-component -v package-manager=${{ matrix.package-manager }} -a
7579
cd new-component
76-
npm install
7780
7881
- name: Build the application
7982
run: |

0 commit comments

Comments
 (0)