-
Notifications
You must be signed in to change notification settings - Fork 22
211 lines (161 loc) · 5.5 KB
/
part-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
on:
workflow_call:
inputs:
COALESCE_VERSION:
required: true
type: string
jobs:
build-dotnet:
runs-on: ubuntu-latest
env:
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
steps:
- uses: actions/checkout@v4
- name: Setup dotnet
uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- run: npm ci
working-directory: src/coalesce-vue
- run: dotnet restore
- run: dotnet build --no-restore --configuration Release
- run: dotnet test --no-build --configuration Release
- run: dotnet pack --no-build --configuration Release -p:PackageOutputPath="$(pwd)/out/packages"
- name: 'Upload Artifact: NuGet Packages'
uses: actions/upload-artifact@v4
with:
name: packages
path: out/packages
validate-vue2-playground:
runs-on: ubuntu-latest
defaults:
run:
working-directory: playground/Coalesce.Web.Vue2
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- run: npm ci
working-directory: src/coalesce-vue
- run: npm ci
working-directory: src/coalesce-vue-vuetify2
- run: npm ci
- run: npm run coalesce
- run: npm run build
- run: dotnet build --configuration Release
validate-vue3-playground:
runs-on: ubuntu-latest
defaults:
run:
working-directory: playground/Coalesce.Web.Vue3
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: |
8.0.x
9.0.x
- run: npm ci
working-directory: src/coalesce-vue
- run: npm ci
working-directory: src/coalesce-vue-vuetify3
- run: npm ci
- run: npm run coalesce
- run: npm run build
- run: dotnet build --configuration Release
build-coalesce-vue:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/coalesce-vue
env:
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
steps:
- uses: actions/checkout@v4
- run: npm ci
- name: npm version
run: npm version $COALESCE_VERSION --no-git-tag-version
- name: npm run test (Vue2)
run: npm run test -- --coverage --reporter=default --reporter=junit --outputFile coalesce-vue2.results.xml
- name: npm run test (Vue3)
run: |
set -e;
cd vue3-tests
npm ci;
# Run a build to check the TS types, since vitest doesn't do full typechecking.
npm run build;
# no coverage on this one, since it'll be identical to vue2 and also doesn't work
# since it ignores the files from outside the vue3-tests directory.
npm run test -- --reporter=default --reporter=junit --outputFile coalesce-vue3.results.xml
# Currently broken with vitest: https://github.com/dorny/test-reporter/issues/187
# - name: Publish Test Results
# uses: dorny/test-reporter@v1
# if: always() && github.event_name != 'pull_request'
# with:
# name: coalesce-vue tests
# path: '**/*.results.xml'
# reporter: jest-junit
- run: npm pack
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: coalesce-vue
path: src/coalesce-vue/coalesce-vue*.tgz
build-coalesce-vue-vuetify2:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/coalesce-vue-vuetify2
env:
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
steps:
- uses: actions/checkout@v4
# build coalesce-vue
- run: npm run build-local-deps
- run: npm ci
- run: npm run build
# now we'll setup the real versions of things.
# Change the package.json with the correct version of coalesce-vue,
# but do not use any npm commands to do so as they'll freak out that the version isn't published.
- name: update *dependencies["coalesce-vue"] version
run: cat <<< "$(cat package.json | jq ".peerDependencies[\"coalesce-vue\"] = \"$COALESCE_VERSION\" | .devDependencies[\"coalesce-vue\"] = \"$COALESCE_VERSION\" ")" > package.json
- name: npm version
run: npm version $COALESCE_VERSION --no-git-tag-version
- run: npm pack
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: coalesce-vue-vuetify2
path: src/coalesce-vue-vuetify2/*.tgz
build-coalesce-vue-vuetify3:
runs-on: ubuntu-latest
defaults:
run:
working-directory: src/coalesce-vue-vuetify3
env:
COALESCE_VERSION: ${{inputs.COALESCE_VERSION}}
steps:
- uses: actions/checkout@v4
# build coalesce-vue
- run: npm run build-local-deps
- run: npm ci
- run: npm run build
- run: npm run test
# now we'll setup the real versions of things.
# Change the package.json with the correct version of coalesce-vue,
# but do not use any npm commands to do so as they'll freak out that the version isn't published.
- name: update *dependencies["coalesce-vue"] version
run: cat <<< "$(cat package.json | jq ".peerDependencies[\"coalesce-vue\"] = \"$COALESCE_VERSION\" | .devDependencies[\"coalesce-vue\"] = \"$COALESCE_VERSION\" ")" > package.json
- name: npm version
run: npm version $COALESCE_VERSION --no-git-tag-version
- run: npm pack
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: coalesce-vue-vuetify3
path: src/coalesce-vue-vuetify3/*.tgz