Skip to content

Commit

Permalink
Sync
Browse files Browse the repository at this point in the history
* Codecov and other changes

* UX Animate update

* Workflow

* Regression change

* Test Runner

* Facade
  • Loading branch information
dudochkin-victor authored Apr 23, 2021
1 parent ac07744 commit 5f83497
Show file tree
Hide file tree
Showing 10 changed files with 46 additions and 15 deletions.
5 changes: 5 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[build]
target = "wasm32-unknown-unknown"

[target.'cfg(target_arch = "wasm32")']
runner = 'wasm-bindgen-test-runner'
2 changes: 2 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ jobs:
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
override: true
profile: minimal
default: true

Expand Down
36 changes: 30 additions & 6 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,42 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
override: true
profile: minimal
default: true

- name: Build
run: cargo build --verbose
- name: Install test runner
run: cargo install wasm-bindgen-cli
- name: Run tests
run: cargo test --verbose

clippy_check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: wasm32-unknown-unknown
override: true
profile: minimal
default: true

- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
Expand Down
6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ wee_alloc = { version = "0.4", optional = true }
yew = "0.17"
yew-router = "0.14"

ux-dataflow = { version = "0.1", optional = true }
ux-animate = { version = "0.1", optional = true }
ux-charts = { version = "0.1", optional = true }
ux-dataflow = { version = "0.1.1", optional = true }
ux-animate = { version = "0.1.3", optional = true }
ux-charts = { version = "0.1.2", optional = true }

[dev-dependencies]
wasm-bindgen-test = "0.3"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
[license-url]: https://github.com/angular-rust/yew-components/blob/master/LICENSE
[gitter-badge]: https://img.shields.io/gitter/room/angular_rust/community.svg?style=flat-square
[gitter-url]: https://gitter.im/angular_rust/community
[tests-badge]: https://img.shields.io/github/workflow/status/angular-rust/yew-components/tests?label=tests&logo=github&style=flat-square
[tests-badge]: https://img.shields.io/github/workflow/status/angular-rust/yew-components/Tests?label=tests&logo=github&style=flat-square
[tests-url]: https://github.com/angular-rust/yew-components/actions/workflows/tests.yml
[codecov-badge]: https://img.shields.io/codecov/c/github/angular-rust/yew-components?logo=codecov&style=flat-square&token=OWZIWBTGII
[codecov-url]: https://codecov.io/gh/angular-rust/yew-components
Expand Down
2 changes: 1 addition & 1 deletion src/barchart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ impl Component for BarChart {

chart.resize(800., 400.);

let ctx = Canvas::new(cr); // overhead
let ctx = Canvas::new(&cr); // overhead
chart.draw(&ctx);

// let element = self.node_ref.cast::<Checkbox>().unwrap();
Expand Down
2 changes: 1 addition & 1 deletion src/gaugechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Component for GaugeChart {

chart.resize(800., 400.);

let ctx = Canvas::new(cr); // overhead
let ctx = Canvas::new(&cr); // overhead
chart.draw(&ctx);
// let element = self.node_ref.cast::<Checkbox>().unwrap();
// if self.props.checked {
Expand Down
2 changes: 1 addition & 1 deletion src/linechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Component for LineChart {

chart.resize(800., 400.);

let ctx = Canvas::new(cr); // overhead
let ctx = Canvas::new(&cr); // overhead
chart.draw(&ctx);
// let element = self.node_ref.cast::<Checkbox>().unwrap();
// if self.props.checked {
Expand Down
2 changes: 1 addition & 1 deletion src/piechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Component for PieChart {

chart.resize(800., 400.);

let ctx = Canvas::new(cr); // overhead
let ctx = Canvas::new(&cr); // overhead
chart.draw(&ctx);
// let element = self.node_ref.cast::<Checkbox>().unwrap();
// if self.props.checked {
Expand Down
2 changes: 1 addition & 1 deletion src/radarchart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ impl Component for RadarChart {

chart.resize(800., 400.);

let ctx = Canvas::new(cr); // overhead
let ctx = Canvas::new(&cr); // overhead
chart.draw(&ctx);
// let element = self.node_ref.cast::<Checkbox>().unwrap();
// if self.props.checked {
Expand Down

0 comments on commit 5f83497

Please sign in to comment.