chore: updated crates #7
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: ci | |
on: | |
push: | |
branches: "**" | |
pull_request: | |
branches: "**" | |
env: | |
DEPLOY_ARTIFACT_DIR: "target/doc" | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
check: | |
name: check | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --all | |
test: | |
name: test | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all | |
fmt: | |
name: fmt | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- run: rustup component add rustfmt | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
clippy: | |
name: clippy | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- run: rustup component add clippy | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all -- -D warnings | |
docs: | |
name: docs | |
needs: [test, fmt, clippy] | |
runs-on: ubuntu-latest | |
env: | |
RUST_BACKTRACE: full | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --all-features | |
- name: setup pages | |
uses: actions/configure-pages@v2 | |
if: | | |
env.DEPLOY_ARTIFACT_DIR != '' && | |
github.ref_name == ${{ github.event.repository.default_branch }} && | |
github.event_name != 'pull_request' | |
- name: upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
if: | | |
env.DEPLOY_ARTIFACT_DIR != '' && | |
github.ref_name == ${{ github.event.repository.default_branch }} && | |
github.event_name != 'pull_request' | |
with: | |
path: ${{ env.DEPLOY_ARTIFACT_DIR }} | |
release: | |
name: release | |
if: | | |
github.ref_name == ${{ github.event.repository.default_branch }} && | |
github.event_name != 'pull_request' | |
needs: [test, fmt, clippy] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
rust: | |
- stable | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- uses: actions-rs/cargo@v1 | |
with: | |
command: login | |
args: ${{ secrets.CARGO_REGISTRY_TOKEN }} | |
- uses: actions-rs/cargo@v1 | |
continue-on-error: true | |
with: | |
command: publish |