Skip to content

Add library code and CI #4

Add library code and CI

Add library code and CI #4

Workflow file for this run

name: CI
on: [pull_request]
env:
RUST_VERSION: 1.77.2
jobs:
test:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: Cache Cargo
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ matrix.build }}-cargo-${{ hashFiles('Cargo.lock') }}
restore-keys: |
${{ matrix.build }}-cargo-
- name: Install Rust
run: |
rustup update $RUST_VERSION --no-self-update
rustup default $RUST_VERSION
rustup component add rustfmt
rustup component add clippy
- name: Check Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --tests --benches -- -D clippy::all
- name: Test
run: cargo test --all-features -- --test-threads=1
env:
RUST_BACKTRACE: 1
all-checks:
runs-on: ubuntu-latest
needs: [test]
steps:
- run: echo "checks ok"