Commit 6e3a109 1 parent cdce076 commit 6e3a109 Copy full SHA for 6e3a109
File tree 2 files changed +80
-3
lines changed
2 files changed +80
-3
lines changed Original file line number Diff line number Diff line change
1
+
2
+ name : Test Coverage
3
+
4
+ on :
5
+ push :
6
+ branches :
7
+ - main
8
+ - dev
9
+ tags :
10
+ - ' **'
11
+ pull_request :
12
+ branches :
13
+ - ' **'
14
+
15
+ jobs :
16
+ coverage :
17
+ name : Test Coverage
18
+ runs-on : ubuntu-latest
19
+
20
+ steps :
21
+ - uses : actions/checkout@v2
22
+ with :
23
+ fetch-depth : 1
24
+
25
+ - uses : actions/setup-python@v2
26
+ name : Install Python 3.9
27
+ with :
28
+ python-version : 3.9
29
+
30
+ - name : Update pip
31
+ run : |
32
+ python -m pip install --upgrade pip
33
+
34
+ - name : Set up rust
35
+ uses : actions-rs/toolchain@v1
36
+ with :
37
+ toolchain : nightly
38
+ default : true
39
+ profile : minimal
40
+ components : llvm-tools-preview
41
+
42
+ - name : Install dependencies
43
+ run : |
44
+ python -m venv venv
45
+ ln -s venv/bin/activate
46
+ . ./activate
47
+
48
+ git clone https://github.com/Chia-Network/clvm_tools.git --branch=develop --single-branch
49
+ git clone https://github.com/Chia-Network/clvm.git --branch=develop --single-branch
50
+ python -m pip install ./clvm_tools
51
+ python -m pip install ./clvm
52
+ python -m pip install colorama
53
+ python -m pip install maturin
54
+ python -m pip install pytest
55
+
56
+ rustup target add x86_64-unknown-linux-musl
57
+ cargo install grcov
58
+ cargo install cargo-binutils
59
+
60
+ - name : Build
61
+ run : |
62
+ . ./activate
63
+ RUSTFLAGS="-Zinstrument-coverage" maturin develop
64
+
65
+ - name : Run tests
66
+ run : |
67
+ . ./activate
68
+ pytest clvm/tests
69
+ cargo test --no-default-features
70
+ grcov . -s . --binary-path ./venv/lib/python3.9/site-packages/ -t lcov + --branch --ignore-not-existing -o lcov.info
71
+
72
+ - name : Coveralls
73
+ uses : coverallsapp/github-action@master
74
+ with :
75
+ path-to-lcov : ./lcov.info
76
+ github-token : ${{ secrets.GITHUB_TOKEN }}
77
+
Original file line number Diff line number Diff line change 1
1
use crate :: allocator:: Allocator ;
2
- use crate :: node:: Node ;
2
+ // use crate::node::Node;
3
3
use crate :: reduction:: EvalErr ;
4
4
5
5
use num_bigint:: BigInt ;
@@ -21,14 +21,14 @@ pub fn ptr_from_number<T: Allocator>(
21
21
}
22
22
allocator. new_atom ( & slice)
23
23
}
24
-
24
+ /*
25
25
impl<T: Allocator> From<&Node<'_, T>> for Option<Number> {
26
26
fn from(item: &Node<T>) -> Self {
27
27
let v: &[u8] = &item.atom()?;
28
28
Some(number_from_u8(v))
29
29
}
30
30
}
31
-
31
+ */
32
32
pub fn number_from_u8 ( v : & [ u8 ] ) -> Number {
33
33
let len = v. len ( ) ;
34
34
if len == 0 {
You can’t perform that action at this time.
0 commit comments