@@ -115,7 +115,6 @@ jobs:
115
115
publish-crates-check :
116
116
name : Publish Check
117
117
needs :
118
- - validate-title
119
118
- lockfile
120
119
- pre-commit
121
120
- commitlint
@@ -139,7 +138,6 @@ jobs:
139
138
cargo-verifications :
140
139
name : Cargo verifications
141
140
needs :
142
- - validate-title
143
141
- lockfile
144
142
- pre-commit
145
143
- commitlint
@@ -167,10 +165,10 @@ jobs:
167
165
- name : Lint project
168
166
run : make lint
169
167
170
- test-coverage :
168
+ test :
171
169
needs :
172
170
- cargo-verifications
173
- name : Test & Coverage
171
+ name : Test
174
172
runs-on : ubuntu-latest
175
173
env :
176
174
NATS_URL : nats://127.0.0.1:4222
@@ -187,6 +185,8 @@ jobs:
187
185
188
186
- name : Install Rust
189
187
uses : ./.github/actions/setup-rust
188
+ with :
189
+ toolchain : ${{ env.RUST_NIGHTLY_VERSION }}
190
190
191
191
- name : Start Nats
192
192
run : |
@@ -195,24 +195,54 @@ jobs:
195
195
- name : Run tests
196
196
run : make test
197
197
198
+ - name : Stop Nats
199
+ if : always()
200
+ run : make stop/nats
201
+
202
+ test-coverage :
203
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
204
+ needs :
205
+ - cargo-verifications
206
+ name : Test & Coverage
207
+ runs-on : ubuntu-latest
208
+ env :
209
+ NATS_URL : nats://127.0.0.1:4222
210
+ NATS_ADMIN_PASS : secret
211
+ NATS_PUBLIC_PASS : secret
212
+ steps :
213
+ - uses : actions/checkout@v4
214
+
215
+ - name : Create .env file with NATS environment variables
216
+ run : |
217
+ echo "NATS_URL=${{ env.NATS_URL }}" > .env
218
+ echo "NATS_ADMIN_PASS=${{ env.NATS_ADMIN_PASS }}" >> .env
219
+ echo "NATS_PUBLIC_PASS=${{ env.NATS_PUBLIC_PASS }}" >> .env
220
+
221
+ - name : Install Rust
222
+ uses : ./.github/actions/setup-rust
223
+ with :
224
+ toolchain : ${{ env.RUST_NIGHTLY_VERSION }}
225
+ target : x86_64-unknown-linux-gnu,wasm32-unknown-unknown
226
+ cache : false
227
+
228
+ - name : Start Nats
229
+ run : |
230
+ make start/nats
231
+
198
232
- name : Install dependencies
199
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
200
233
run : |
201
234
sudo apt-get update
202
235
sudo apt-get install -y libclang-dev curl
203
236
204
237
- name : Install Tarpaulin (Pre-built Binary)
205
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
206
238
uses : taiki-e/cache-cargo-install-action@v2
207
239
with :
208
240
tool : cargo-tarpaulin@0.31
209
241
210
242
- name : Generate Code Coverage
211
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
212
243
run : make coverage
213
244
214
245
- name : Upload to codecov.io
215
- if : github.event_name == 'push' && github.ref == 'refs/heads/main'
216
246
uses : codecov/codecov-action@v4
217
247
with :
218
248
name : codecov-data-systems
@@ -317,36 +347,31 @@ jobs:
317
347
318
348
release :
319
349
name : Create Release with Knope
320
- if : (github.head_ref == 'changeset/release-main' && github.event.pull_request.merged == true) || github.event_name
321
- == 'workflow_dispatch'
350
+ if : >-
351
+ (github.event_name == 'push' &&
352
+ github.ref == 'refs/heads/main' &&
353
+ contains(github.event.head_commit.message, 'ci(release): Preparing')) ||
354
+ github.event_name == 'workflow_dispatch'
322
355
needs :
323
- - test-coverage
356
+ - test
324
357
- build
325
358
runs-on : ubuntu-latest
326
359
permissions :
327
360
contents : read
328
361
actions : write
329
362
steps :
330
363
- name : Checkout Repository
331
- uses : actions/checkout@v4.1.6
364
+ uses : actions/checkout@v4
332
365
333
366
- name : Download Artifacts
334
- uses : actions/download-artifact@v4.1.7
367
+ uses : actions/download-artifact@v4
335
368
with :
336
369
path : artifacts
337
370
merge-multiple : true
338
371
339
372
- name : List Artifacts
340
373
run : ls -R artifacts
341
374
342
- - name : Cache Artifacts
343
- uses : actions/cache@v4
344
- with :
345
- path : artifacts
346
- key : ${{ runner.os }}-artifacts-${{ github.sha }}
347
- restore-keys : |
348
- ${{ runner.os }}-artifacts-
349
-
350
375
- name : Run Knope Action
351
376
uses : knope-dev/action@v2.1.0
352
377
with :
@@ -355,31 +380,4 @@ jobs:
355
380
- name : Knope Release
356
381
run : knope release
357
382
env :
358
- github-token : ${{ secrets.REPO_TOKEN }}
359
-
360
- publish-crates :
361
- name : Publish on Crates.io
362
- needs :
363
- - publish-crates-check
364
- - release
365
- runs-on : ubuntu-latest
366
- steps :
367
- - name : Checkout Repository
368
- uses : actions/checkout@v4
369
-
370
- - name : Restore Artifacts Cache
371
- uses : actions/cache@v4
372
- with :
373
- path : artifacts
374
- key : ${{ runner.os }}-artifacts-${{ github.sha }}
375
- restore-keys : |
376
- ${{ runner.os }}-artifacts-
377
-
378
- - name : Install Rust Toolchain
379
- uses : dtolnay/rust-toolchain@master
380
-
381
- - name : Publish Crate
382
- uses : FuelLabs/publish-crates@v1
383
- with :
384
- publish-delay : 60000
385
- registry-token : ${{ secrets.CARGO_REGISTRY_TOKEN }}
383
+ GITHUB_TOKEN : ${{ secrets.REPO_TOKEN }}
0 commit comments