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:
43
43
strategy :
44
44
matrix :
45
45
os : [ubuntu-latest, macos-latest, windows-latest]
46
+ package-manager : [npm, yarn]
46
47
47
48
steps :
48
49
- uses : actions/checkout@v3
49
50
50
- - name : Use Node.js 20
51
+ - name : Use Node.js 22
51
52
uses : actions/setup-node@v3
52
53
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
54
59
55
60
- name : Setup `spin`
56
61
uses : fermyon/actions/spin/setup@v1
@@ -61,19 +66,17 @@ jobs:
61
66
run : spin templates install --dir .
62
67
63
68
- 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
65
70
66
71
- name : Install dependencies of the test project
67
72
run : |
68
73
cd test-project
69
- npm install
70
74
71
75
- name : Add new component to project
72
76
run : |
73
77
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
75
79
cd new-component
76
- npm install
77
80
78
81
- name : Build the application
79
82
run : |
Original file line number Diff line number Diff line change 7
7
{%- if package-manager == "npm" -% }
8
8
"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" ,
9
9
{%- 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" ,
11
11
{%- endif -% }
12
12
"test" : " echo \" Error: no test specified\" && exit 1"
13
13
},
You can’t perform that action at this time.
0 commit comments