diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..2285792 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,79 @@ +name: Continuous integration + +on: [push, pull_request] + +env: + CARGO_TERM_COLOR: always + +jobs: + check: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: check + args: --all-features + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: build + args: --all-features + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: --all-features + + fmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - run: rustup component add rustfmt + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + - run: rustup component add clippy + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: -- -D -warnings diff --git a/Cargo.toml b/Cargo.toml index 51329e6..cc77b1e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,7 @@ [package] name = "binator_nom" authors = ["Stargateur"] -version = "0.0.0" +version = "0.0.1" description = "binator nom adaptater" license = "Zlib" repository = "https://github.com/binator/nom" @@ -20,10 +20,10 @@ include = [ [dependencies] nom = '7' -binator_core = "0.0.2" +binator = "0.3.0" [dev-dependencies] -binator_context = { git = "https://github.com/binator/context.git" } +binator = "0.3.0" pretty_assertions = "1" derive-new = "0.5" derive_more = "0.99" \ No newline at end of file diff --git a/src/lib.rs b/src/lib.rs index 8e09187..fccd0f0 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -11,7 +11,7 @@ use core::{ marker::PhantomData, }; -use binator_core::{ +use binator::{ Contexting, Parse, Parsed, @@ -109,11 +109,11 @@ where #[cfg(test)] mod tests { - use binator_context::{ - First, - Keep, - }; - use binator_core::{ + use binator::{ + context::{ + First, + Keep, + }, Contexting, Parse, Parsed, @@ -136,7 +136,10 @@ mod tests { IResult, }; - use crate::{Nom, NomAtom}; + use crate::{ + Nom, + NomAtom, + }; #[derive(Display, Debug, PartialEq, From)] enum FromAtom {