json-ld 0.21.4

JSON-LD implementation
Documentation
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: |
          git submodule init
          git submodule update
          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@1.87.0
        with:
          components: rustfmt, clippy
      - name: Check formatting
        run: cargo fmt --all -- --check
      - name: Clippy
        run: cargo clippy --all-features -- -D warnings