File tree Expand file tree Collapse file tree 2 files changed +10
-7
lines changed
templates/http-ts/content Expand file tree Collapse file tree 2 files changed +10
-7
lines changed Original file line number Diff line number Diff 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 : |
Original file line number Diff line number Diff line change 77 {%- if package-manager == "npm" -% }
88 "build" : " knitwit --out-dir build/wit/knitwit --out-world combined && npx webpack --mode=production && npx mkdirp dist && npx j2w -i build/bundle.js -d build/wit/knitwit -n combined -o dist/{{ project-name | kebab_case }}.wasm" ,
99 {%- else -% }
10- "build" : " knitwit --out-dir build/wit/knitwit --out-world combined && yarn exec webpack -- -- mode=production && yarn exec mkdirp -- dist && yarn exec j2w -- -i build/bundle.js -d build/wit/knitwit -n combined -o dist/{{ project-name | kebab_case }}.wasm" ,
10+ "build" : " knitwit --out-dir build/wit/knitwit --out-world combined && webpack --mode=production && mkdirp -- dist && j2w -i build/bundle.js -d build/wit/knitwit -n combined -o dist/{{ project-name | kebab_case }}.wasm" ,
1111 {%- endif -% }
1212 "test" : " echo \" Error: no test specified\" && exit 1"
1313 },
You can’t perform that action at this time.
0 commit comments