Skip to content

ci: add publish workflow for crates.io #3

ci: add publish workflow for crates.io

ci: add publish workflow for crates.io #3

Workflow file for this run

name: CI
on:
push:
branches: [master]
pull_request:
# Trigger on any pull request
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache cargo registry and build
uses: swatinem/rust-cache@v2
- name: Run tests
run: cargo test --workspace
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache cargo registry and build
uses: swatinem/rust-cache@v2
- name: Run clippy
run: cargo clippy --workspace -- -D warnings
fmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- name: Cache cargo registry and build
uses: swatinem/rust-cache@v2
- name: Check formatting
run: cargo fmt --all -- --check