Add gh workflow
This commit is contained in:
parent
182797b0ba
commit
80f88fb461
|
@ -0,0 +1,75 @@
|
||||||
|
# copy of https://github.com/actions-rs/meta/blob/master/recipes/quickstart.md
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check:
|
||||||
|
name: Check
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
command: check
|
||||||
|
|
||||||
|
test:
|
||||||
|
name: Test Suite
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||||
|
runs-on: ${{ matrix.os }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
command: build
|
||||||
|
- uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
command: test
|
||||||
|
|
||||||
|
|
||||||
|
lints:
|
||||||
|
name: Rust lints
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
- uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
profile: minimal
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
|
|
||||||
|
- name: Run cargo fmt
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
command: fmt
|
||||||
|
args: --all -- --check
|
||||||
|
|
||||||
|
- name: Run cargo clippy
|
||||||
|
uses: actions-rs/cargo@v1
|
||||||
|
continue-on-error: false
|
||||||
|
with:
|
||||||
|
command: clippy
|
||||||
|
args: -- --deny warnings
|
|
@ -295,7 +295,7 @@ impl<Tx: Clone + Debug> ClaroSolver<Tx> {
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod test {
|
mod test {
|
||||||
use crate::claro::{Decision, ClaroConfiguration, ClaroSolver, QueryConfiguration, Vote};
|
use crate::claro::{ClaroConfiguration, ClaroSolver, Decision, QueryConfiguration, Vote};
|
||||||
use crate::query::NodeQuery;
|
use crate::query::NodeQuery;
|
||||||
use crate::testing::query::*;
|
use crate::testing::query::*;
|
||||||
use crate::{Opinion, VoteQuery};
|
use crate::{Opinion, VoteQuery};
|
||||||
|
|
|
@ -6,7 +6,7 @@ mod tracing;
|
||||||
pub mod testing;
|
pub mod testing;
|
||||||
|
|
||||||
pub use self::claro::{
|
pub use self::claro::{
|
||||||
Decision, ClaroConfiguration, ClaroSolver, ClaroState, Opinion, QueryConfiguration, Vote,
|
ClaroConfiguration, ClaroSolver, ClaroState, Decision, Opinion, QueryConfiguration, Vote,
|
||||||
};
|
};
|
||||||
pub use self::query::{NodeId, NodeQuery, NodeWeight, NodesSample, VoteQuery};
|
pub use self::query::{NodeId, NodeQuery, NodeWeight, NodesSample, VoteQuery};
|
||||||
pub use self::tracing::{claro_tracing_layer_with_writer, CLARO_TARGET_TAG};
|
pub use self::tracing::{claro_tracing_layer_with_writer, CLARO_TARGET_TAG};
|
||||||
|
|
Loading…
Reference in New Issue