๐๏ธ update detected yanked crate #174
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main Workflow | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install 1.77.0 toolchain | |
uses: dtolnay/rust-toolchain@1.77.0 | |
with: | |
components: clippy, rustfmt | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Download SurrealDB | |
run: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --alpha | |
- name: Run SurrealDB root | |
run: surreal start --user root --pass root memory & | |
- name: Run SurrealDB admin | |
run: surreal start --user admin --pass admin --bind 0.0.0.0:8001 memory & | |
- name: Run check | |
run: cargo check --all | |
- name: Run tests | |
run: cargo test | |
- name: Run format | |
run: | | |
cargo check --all | |
cargo fix | |
- name: Run lint | |
run: cargo clippy -- -Dwarnings | |
coverage: | |
needs: ci | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install 1.77.0 toolchain | |
uses: dtolnay/rust-toolchain@1.77.0 | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Download SurrealDB | |
run: curl --proto '=https' --tlsv1.2 -sSf https://install.surrealdb.com | sh -s -- --alpha | |
- name: Run SurrealDB root | |
run: surreal start --user root --pass root memory & | |
- name: Run SurrealDB admin | |
run: surreal start --user admin --pass admin --bind 0.0.0.0:8001 memory & | |
- name: Run cargo-tarpaulin | |
uses: actions-rs/tarpaulin@v0.1 | |
with: | |
version: "0.22.0" | |
args: "--engine llvm --target-dir target/tarpaulin --skip-clean" | |
- name: Upload to codecov.io | |
uses: codecov/codecov-action@v3 | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v1 | |
with: | |
name: code-coverage-report | |
path: cobertura.xml | |
docs: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Install 1.77.0 toolchain | |
uses: dtolnay/rust-toolchain@1.77.0 | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build documentation | |
run: cargo doc | |
cargo-deny: | |
name: cargo-deny | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
checks: | |
- advisories | |
- bans licenses sources | |
# Prevent sudden announcement of a new advisory from failing ci: | |
continue-on-error: ${{ matrix.checks == 'advisories' }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: EmbarkStudios/cargo-deny-action@v1 | |
with: | |
command: check ${{ matrix.checks }} |