30
30
with :
31
31
submodules : " recursive"
32
32
33
- - uses : pnpm/action-setup@v2
33
+ - uses : pnpm/action-setup@v3
34
34
name : Install pnpm
35
35
with :
36
36
version : ${{env.default_pnpm_version}}
53
53
steps :
54
54
- uses : actions/checkout@v4
55
55
56
- - uses : pnpm/action-setup@v2
56
+ - uses : pnpm/action-setup@v3
57
57
name : Install pnpm
58
58
with :
59
59
version : ${{env.default_pnpm_version}}
@@ -74,19 +74,14 @@ jobs:
74
74
name : Build
75
75
uses : ./.github/workflows/build.yml
76
76
77
- test-ve :
78
- name : test-ve
77
+ test-e2e :
78
+ name : test-e2e
79
79
needs : build
80
80
runs-on : ${{ matrix.os }}
81
- services :
82
- verdaccio :
83
- image : verdaccio/verdaccio:5
84
- ports :
85
- - 4873:4873
86
81
strategy :
87
82
matrix :
88
- os : [ubuntu-latest]
89
- pm : [" pnpm", " npm", " yarn" ]
83
+ os : [ubuntu-latest, windows-latest, macos-latest ]
84
+ pm : [pnpm, npm, yarn]
90
85
fail-fast : false
91
86
92
87
steps :
98
93
with :
99
94
name : artifact
100
95
101
- - uses : pnpm/action-setup@v2
96
+ - uses : pnpm/action-setup@v3
102
97
name : Install pnpm
103
98
if : ${{ matrix.pm == 'pnpm' }}
104
99
with :
@@ -108,70 +103,29 @@ jobs:
108
103
with :
109
104
node-version : ${{env.default_node_version}}
110
105
111
- - name : login to 'verdaccio'
112
- run : npx npm-cli-login -u test -p 1234 -e test@domain.test -r http://localhost:4873
106
+ - name : setup 'verdaccio'
107
+ id : verdaccio
108
+ uses : ./.github/actions/verdaccio-actions
109
+ with :
110
+ verdaccio-config : .verdaccio/.verdaccio.yaml
111
+ token-config : true
112
+ token-content : gHz2lB9wOy+kDV4Cyy+v0w==
113
113
114
- - name : version for 'verdaccio'
114
+ - name : version for test
115
115
run : |
116
- npm version patch --commit-hooks false --git-tag-version false
116
+ npm version major --commit-hooks false --git-tag-version false
117
117
118
118
- name : publish to 'verdaccio'
119
119
run : |
120
- npm publish --registry http://localhost:4873
120
+ npm publish --registry http://${{ steps.verdaccio.outputs.listen }}
121
121
122
122
- name : config for test
123
123
run : |
124
124
mkdir ../.temp
125
- ${{ matrix.pm }} config set registry http://localhost:4873/
125
+ ${{ matrix.pm }} config set registry http://${{ steps.verdaccio.outputs.listen }}
126
126
127
127
- name : Test via ${{ matrix.pm }}
128
128
working-directory : ../.temp/
129
129
timeout-minutes : 5
130
130
run : |
131
131
${{ matrix.pm }} create hexo
132
-
133
- test-ln :
134
- name : test-ln
135
- needs : build
136
- runs-on : ${{ matrix.os }}
137
- strategy :
138
- matrix :
139
- os : [windows-latest, macos-latest]
140
- pm : ["pnpm", "npm"]
141
- fail-fast : false
142
-
143
- steps :
144
- - uses : actions/checkout@v4
145
- # with:
146
- # submodules: "recursive"
147
-
148
- - uses : actions/download-artifact@v4
149
- with :
150
- name : artifact
151
-
152
- - uses : pnpm/action-setup@v2
153
- name : Install pnpm
154
- if : ${{ matrix.pm == 'pnpm' }}
155
- with :
156
- version : ${{env.default_pnpm_version}}
157
-
158
- - uses : actions/setup-node@v4
159
- with :
160
- node-version : ${{env.default_node_version}}
161
-
162
- - name : config for test
163
- run : |
164
- mkdir ../temp
165
- node scripts/getVersion.mjs
166
-
167
- - name : Link via ${{ matrix.pm }}
168
- working-directory : ../temp/
169
- timeout-minutes : 5
170
- run : |
171
- ${{ matrix.pm }} add ../create-hexo/create-hexo-${{env.version}}.tgz
172
-
173
- - name : Test via ${{ matrix.pm }}
174
- working-directory : ../temp/
175
- timeout-minutes : 5
176
- run : |
177
- ${{ matrix.pm }} exec create-hexo test
0 commit comments