Skip to content

Commit 8378681

Browse files
committed
chore: Refactor code coverage script.
1 parent 0471cfd commit 8378681

File tree

4 files changed

+48
-28
lines changed

4 files changed

+48
-28
lines changed

Diff for: .github/workflows/ci.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: ci
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
410

511
jobs:
612
ci:
@@ -36,9 +42,3 @@ jobs:
3642

3743
- name: test on Nightly
3844
run: cargo test --workspace
39-
40-
- name: coverage
41-
run: |
42-
cargo install cargo-tarpaulin
43-
cargo tarpaulin --out xml
44-
bash <(curl -s https://codecov.io/bash)

Diff for: .github/workflows/coverage.yml

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: coverage
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
push:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
name: coverage
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- uses: dtolnay/rust-toolchain@nightly
19+
20+
- name: coverage nightly
21+
run: |
22+
cargo install cargo-tarpaulin
23+
cargo tarpaulin --out xml --output-dir ./nightly --workspace
24+
- uses: dtolnay/rust-toolchain@stable
25+
26+
- name: coverage nightly
27+
run: |
28+
cargo tarpaulin --out xml --output-dir ./stable --workspace
29+
- uses: codecov/codecov-action@v3
30+
with:
31+
token: ${{ secrets.CODECOV_TOKEN }}
32+
files: ./stable/cobertura.xml,./nightly/cobertura.xml
33+
name: RSTML

Diff for: .tarpaulin.toml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
[unquoted_text_on_stable]
2+
features = "rstml/rawtext-stable-hack"
3+
4+
[custom_node_extendable]
5+
features = "rstml-control-flow/extendable"
6+
7+
[report]
8+
out = ["Xml", "Html"]

Diff for: src/node/raw_text.rs

-21
Original file line numberDiff line numberDiff line change
@@ -208,27 +208,6 @@ impl<C: CustomNode> ParseRecoverable for RawText<C> {
208208
_c: PhantomData,
209209
})
210210
}
211-
// (input: ParseStream) -> syn::Result<Self> {
212-
// let mut token_stream = TokenStream::new();
213-
// let any_node = |input: ParseStream| {
214-
// input.peek(Token![<])
215-
// || input.peek(Brace)
216-
// || input.peek(LitStr)
217-
// || C::peek_element(&input.fork())
218-
// };
219-
// // Parse any input until catching any node.
220-
// // Fail only on eof.
221-
// while !any_node(input) && !input.is_empty() {
222-
// token_stream.extend([input.parse::<TokenTree>()?])
223-
// }
224-
// Ok(Self {
225-
// token_stream,
226-
// context_span: None,
227-
// #[cfg(feature = "rawtext-stable-hack-module")]
228-
// recovered_text: None,
229-
// _c: PhantomData,
230-
// })
231-
// }
232211
}
233212

234213
impl<C: CustomNode> ToTokens for RawText<C> {

0 commit comments

Comments
 (0)