diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0a34947 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,50 @@ +name: Continuous Integration + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + types: + - opened + - reopened + - synchronize + - ready_for_review + +env: + CARGO_TERM_COLORS: always + +jobs: + test: + name: Test + runs-on: ubuntu-latest + if: ${{ !github.event.pull_request.draft }} + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Retrieve MSRV + id: msrv + run: echo "MSRV=$(cat Cargo.toml | grep -Po '(?<=rust-version = ")([\d\.]+)')" >> $GITHUB_OUTPUT + - name: Install Rust + uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ steps.msrv.outputs.MSRV }} + - name: Build + run: cargo build --all-features --verbose + - name: Run tests + run: cargo test --all-features --verbose --all-targets + + lint: + name: Lint + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + components: rustfmt, clippy + - name: Check formatting + run: cargo fmt --all -- --check + - name: Clippy + run: cargo clippy --all-features -- -D warnings \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index ab98a64..ecdee3f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ name = "w3c-vc-barcodes" version = "0.1.0" edition = "2021" +rust-version = "1.77.2" [dependencies] iref = { version = "3.1.4", features = ["serde"] } diff --git a/README.md b/README.md index c26893c..7877ea9 100644 --- a/README.md +++ b/README.md @@ -1 +1,13 @@ -# Verifiable Credential Barcodes v0.7 implementation for Rust \ No newline at end of file +# Verifiable Credential Barcodes v0.7 implementation for Rust + + + +This library provides [Verifiable Credential Barcodes v0.7][vc-barcodes] +based on ssi. + +[vc-barcodes]: + +The `examples` folder contains a few examples showing how to create and +verify VCBs. + + diff --git a/src/lib.rs b/src/lib.rs index a86293a..df118ce 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -2,6 +2,9 @@ //! based on ssi. //! //! [vc-barcodes]: +//! +//! The `examples` folder contains a few examples showing how to create and +//! verify VCBs. pub use ssi::claims::chrono::{DateTime, Utc}; pub mod aamva;