File tree Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Expand file tree Collapse file tree 2 files changed +48
-1
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,58 @@ jobs:
193
193
- run : cargo hack check --feature-powerset --lib
194
194
working-directory : ./css-inline
195
195
196
+ coverage :
197
+ name : Code coverage
198
+ runs-on : ubuntu-20.04
199
+ steps :
200
+ - uses : actions/checkout@v2
201
+ with :
202
+ submodules : true
203
+
204
+ - name : Toolchain setup
205
+ uses : actions-rs/toolchain@v1
206
+ with :
207
+ toolchain : nightly
208
+ override : true
209
+
210
+ - name : Install `cargo-tarpaulin`
211
+ run : cargo install cargo-tarpaulin
212
+
213
+ - name : Cache cargo
214
+ uses : actions/cache@v3
215
+ with :
216
+ path : |
217
+ ~/.cargo/registry
218
+ ~/.cargo/git
219
+ target
220
+ key : coverage-cargo-cache
221
+
222
+ - uses : actions/setup-python@v2
223
+ with :
224
+ python-version : 3.7
225
+
226
+ - name : Start background server
227
+ run : |
228
+ python -m pip install flask
229
+ # Starts the server in background
230
+ python ./css-inline/tests/server.py &
231
+
232
+ - name : Run tests
233
+ run : cargo tarpaulin --verbose --all-features --out Xml
234
+ working-directory : ./css-inline
235
+
236
+ - name : Upload coverage to Codecov
237
+ uses : codecov/codecov-action@v3
238
+ if : ${{ env.GITHUB_REPOSITORY }} == 'Stranger6667/css-inline'
239
+ with :
240
+ name : coverage
241
+
196
242
fuzz :
197
243
name : Fuzz
198
244
runs-on : ubuntu-20.04
199
245
steps :
200
246
- uses : actions/checkout@v3
201
247
- uses : dtolnay/rust-toolchain@nightly
202
248
- run : cargo install cargo-fuzz
203
- - run : cargo fuzz build -O
249
+ - run : cargo fuzz run inline -- -max_total_time=60
204
250
working-directory : ./css-inline
Original file line number Diff line number Diff line change 1
1
# css-inline
2
2
3
3
[ ![ ci] ( https://github.com/Stranger6667/css-inline/workflows/ci/badge.svg )] ( https://github.com/Stranger6667/css-inline/actions )
4
+ [ ![ codecov] ( https://codecov.io/gh/Stranger6667/css-inline/branch/master/graph/badge.svg )] ( https://codecov.io/gh/Stranger6667/css-inline )
4
5
[ ![ Crates.io] ( https://img.shields.io/crates/v/css-inline.svg )] ( https://crates.io/crates/css-inline )
5
6
[ ![ docs.rs] ( https://docs.rs/css-inline/badge.svg )] ( https://docs.rs/css-inline/ )
6
7
[ ![ gitter] ( https://img.shields.io/gitter/room/Stranger6667/css-inline.svg )] ( https://gitter.im/Stranger6667/css-inline )
You can’t perform that action at this time.
0 commit comments