Skip to content

Commit

Permalink
Add rust workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Skepfyr committed Feb 13, 2021
1 parent 4c21616 commit 15401e4
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 2 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Rust

on: push

env:
CARGO_TERM_COLOR: always

jobs:

test:
runs-on: ubuntu-latest
steps:
- name: Install stable rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
- uses: actions/checkout@v2
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --all --all-features
- name: Test
uses: actions-rs/cargo@v1
with:
command: test
args: --all --all-features

clippy-check:
runs-on: ubuntu-latest
steps:
- name: Install stable rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: clippy
- uses: actions/checkout@v2
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all --all-features

rustfmt-check:
runs-on: ubuntu-latest
steps:
- name: Install stable rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
profile: minimal
components: rustfmt
- uses: actions/checkout@v2
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
4 changes: 3 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ readme = "README.md"
keywords = ["send", "sync"]
categories = ["rust-patterns", "concurrency"]

exclude = [".github"]

[dependencies]
flume = { version = "0.10", default-features = false }
crossbeam-channel = "0.5"
once_cell = "1"

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
non_ascii_idents
)]

use flume::{bounded, unbounded, Sender};
use crossbeam_channel::{bounded, unbounded, Sender};
use once_cell::sync::Lazy;
use std::{
fmt,
Expand Down

0 comments on commit 15401e4

Please sign in to comment.