Skip to content

Commit

Permalink
Codecov and other changes (#2)
Browse files Browse the repository at this point in the history
  • Loading branch information
dudochkin-victor authored Apr 23, 2021
1 parent 372265a commit ac07744
Show file tree
Hide file tree
Showing 13 changed files with 132 additions and 24 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ It would be nice to have screenshot or result image uploaded
Some minimal reproduce code is highly recommended

**Version Information**
Please give us what version you are using. If you are pulling `Plotters` directly from git repo, please mention this as well
Please give us what version you are using. If you are pulling `YMC` directly from git repo, please mention this as well
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature request
about: Suggest an idea to Plotter maintainers
about: Suggest an idea to YMC maintainers
title: "[Feature Request]"
labels: feature request
assignees: ''
Expand Down
9 changes: 9 additions & 0 deletions .github/codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
comment:
layout: "diff, flags, files"
require_changes: true

coverage:
status:
project:
default:
informational: true
17 changes: 17 additions & 0 deletions .github/workflows/audit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Security audit
on:
pull_request:
push:
branches:
- master
schedule:
- cron: '0 0 * * 0'

jobs:
security_audit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
49 changes: 49 additions & 0 deletions .github/workflows/coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Test coverage

#on:
# push:
# branches:
# - main
# pull_request:

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full

jobs:
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

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

- name: Restore cache
uses: Swatinem/rust-cache@v1

- name: Run cargo-tarpaulin
uses: actions-rs/[email protected]
with:
args: '--all-features --run-types Doctests,Tests'
timeout: 120

- name: Upload to codecov.io
uses: codecov/codecov-action@239febf655bba88b16ff5dea1d3135ea8663a1f9
with:
token: ${{ secrets.CODECOV_TOKEN }}

- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: code-coverage-report
path: cobertura.xml
retention-days: 30
27 changes: 27 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Tests

on: [push, pull_request]

jobs:
build:

runs-on: ubuntu-latest

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

clippy_check:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- run: rustup component add clippy
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ maintenance = { status = "actively-developed" }
[features]
banner = []
button = []
barchart = ["ux-animate", "ux-dataflow", "ux-charts", "ux-charts/web"]
barchart = ["ux-animate", "ux-dataflow", "ux-charts"]
card = []
charts = ["barchart", "gaugechart", "linechart", "piechart", "radarchart"]
checkbox = []
Expand All @@ -30,17 +30,17 @@ dialog = []
drawer = []
fab = []
formfield = []
gaugechart = ["ux-animate", "ux-dataflow", "ux-charts", "ux-charts/web"]
gaugechart = ["ux-animate", "ux-dataflow", "ux-charts"]
icon-button-toggle = []
icon-button = []
icon = []
image-list = []
linechart = ["ux-animate", "ux-dataflow", "ux-charts", "ux-charts/web"]
linechart = ["ux-animate", "ux-dataflow", "ux-charts"]
linear-progress = []
list = []
menu = []
piechart = ["ux-animate", "ux-dataflow", "ux-charts", "ux-charts/web"]
radarchart = ["ux-animate", "ux-dataflow", "ux-charts", "ux-charts/web"]
piechart = ["ux-animate", "ux-dataflow", "ux-charts"]
radarchart = ["ux-animate", "ux-dataflow", "ux-charts"]
radio = []
select = []
slider = []
Expand Down
20 changes: 13 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# YEW Material Components
#

<div align="center">

[![](https://dudochkin-victor.github.io/assets/yew-components/logo.svg)](#top)
# YEW Material Components

[![API Docs][docrs-badge]][docrs-url]
[![Crates.io][crates-badge]][crates-url]
[![Code coverage][codecov-badge]][codecov-url]
[![Tests][tests-badge]][tests-url]
[![MPL-2.0 licensed][license-badge]][license-url]
[![Gitter chat][gitter-badge]][gitter-url]
[![Rustc Version 1.45+][rust-badge]][rust-url]
[![loc][loc-badge]][loc-url]
</div>

Expand All @@ -16,11 +20,13 @@
[crates-url]: https://crates.io/crates/ymc
[license-badge]: https://img.shields.io/badge/license-MPL--2.0-blue.svg?style=flat-square
[license-url]: https://github.com/angular-rust/yew-components/blob/master/LICENSE
[gitter-badge]: https://img.shields.io/gitter/room/angular_rust/angular_rust.svg?style=flat-square
[gitter-badge]: https://img.shields.io/gitter/room/angular_rust/community.svg?style=flat-square
[gitter-url]: https://gitter.im/angular_rust/community
[rust-badge]: https://img.shields.io/badge/rustc-1.45-lightgrey.svg?style=flat-square
[rust-url]: https://blog.rust-lang.org/2020/07/16/Rust-1.45.0.html
[loc-badge]: https://tokei.rs/b1/github/angular-rust/yew-components?category=code
[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
[loc-badge]: https://img.shields.io/tokei/lines/github/angular-rust/yew-components?style=flat-square
[loc-url]: https://github.com/angular-rust/yew-components

Material Design Components for the Yew framework.
Expand Down Expand Up @@ -129,7 +135,7 @@ These components respect the theming applied to Material Design Components using

We believe the wider community can create better code. The first tool for improving the community is to tell the developers about the project by giving it a star. More stars - more members.

![Star a repo](https://dudochkin-victor.github.io/assets/star-me-wide.svg)
[![](https://dudochkin-victor.github.io/assets/star-me-wide.svg)](https://github.com/angular-rust/yew-components#top)

Angular Rust is a community effort and we welcome all kinds of contributions, big or small, from developers of all backgrounds. We want the Angular Rust community to be a fun and friendly place, so please review our [Code of Conduct](CODE_OF_CONDUCT.md) to learn what behavior will not be tolerated.

Expand Down
4 changes: 2 additions & 2 deletions src/barchart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(unused_imports)]

use super::to_option;
use animate::WebCanvas;
use animate::Canvas;
use charts::{BarChart as BarChartComponent, BarChartOptions, Chart};
use dataflow::*;
use wasm_bindgen::prelude::*;
Expand Down Expand Up @@ -114,7 +114,7 @@ impl Component for BarChart {

chart.resize(800., 400.);

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

// let element = self.node_ref.cast::<Checkbox>().unwrap();
Expand Down
4 changes: 2 additions & 2 deletions src/gaugechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(unused_imports)]

use super::to_option;
use animate::WebCanvas;
use animate::Canvas;
use charts::{Chart, GaugeChart as GaugeChartComponent, GaugeChartOptions};
use dataflow::*;
use wasm_bindgen::prelude::*;
Expand Down Expand Up @@ -110,7 +110,7 @@ impl Component for GaugeChart {

chart.resize(800., 400.);

let ctx = WebCanvas::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
4 changes: 2 additions & 2 deletions src/linechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(unused_imports)]

use super::to_option;
use animate::WebCanvas;
use animate::Canvas;
use charts::{Chart, LineChart as LineChartComponent, LineChartOptions};
use dataflow::*;
use wasm_bindgen::prelude::*;
Expand Down Expand Up @@ -112,7 +112,7 @@ impl Component for LineChart {

chart.resize(800., 400.);

let ctx = WebCanvas::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
4 changes: 2 additions & 2 deletions src/piechart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(unused_imports)]

use super::to_option;
use animate::WebCanvas;
use animate::Canvas;
use charts::{Chart, PieChart as PieChartComponent, PieChartOptions};
use dataflow::*;
use wasm_bindgen::prelude::*;
Expand Down Expand Up @@ -115,7 +115,7 @@ impl Component for PieChart {

chart.resize(800., 400.);

let ctx = WebCanvas::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
4 changes: 2 additions & 2 deletions src/radarchart.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#![allow(unused_imports)]

use super::to_option;
use animate::WebCanvas;
use animate::Canvas;
use charts::{Chart, RadarChart as RadarChartComponent, RadarChartOptions};
use dataflow::*;
use wasm_bindgen::prelude::*;
Expand Down Expand Up @@ -110,7 +110,7 @@ impl Component for RadarChart {

chart.resize(800., 400.);

let ctx = WebCanvas::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 ac07744

Please sign in to comment.