name: Check on: push: branches: - main pull_request: branches: - main permissions: checks: write env: CARGO_TERM_COLOR: always jobs: check: name: Check runs-on: ubuntu-latest steps: - name: 📥 Checkout uses: actions/checkout@v3 with: fetch-depth: 0 - name: ✨ Set up the toolchain uses: actions-rs/toolchain@v1 with: profile: minimal toolchain: stable components: rustfmt, clippy - name: ⚡️ Rust Cache uses: Swatinem/rust-cache@v1 with: cache-on-failure: true - name: 🧪 Test without optional features uses: actions-rs/cargo@v1 with: command: test args: --all-targets - name: 🧪 Test uses: actions-rs/cargo@v1 with: command: test args: --all-features - name: 🪄 Clippy uses: actions-rs/clippy-check@v1 continue-on-error: true with: token: ${{ secrets.GITHUB_TOKEN }} args: --all-targets --all-features --tests -- -D warnings - name: 📤 Publish the crates (dry run) run: | cargo publish --allow-dirty --dry-run env: CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}