diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml new file mode 100644 index 0000000..f6e21ba --- /dev/null +++ b/.github/workflows/CI.yml @@ -0,0 +1,34 @@ +name: CI + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +env: + CARGO_TERM_COLOR: always + +jobs: + cargo-test: + strategy: + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/cache@v3 + with: + path: | + ~/.cargo/bin/ + ~/.cargo/registry/index/ + ~/.cargo/registry/cache/ + ~/.cargo/git/db/ + target/ + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + + - uses: actions/checkout@v3 + - name: Run cargo deftest + run: cargo test --verbose + - name: Run cargo alltest + run: cargo test --all-features --verbose diff --git a/examples/arr.rs b/examples/arr.rs index 985b19e..ac455c1 100644 --- a/examples/arr.rs +++ b/examples/arr.rs @@ -3,6 +3,6 @@ use core::ffi::CStr; fn main() { let cstr = cstr!(b"Test Custom cstr"); - + assert_eq!(cstr.to_bytes_with_nul(), b"Test Custom cstr\0"); }