Skip to content

test: add docs test #164

test: add docs test

test: add docs test #164

Workflow file for this run

name: test
on:
push:
branches:
- main
- master
pull_request:
workflow_dispatch:
release:
types: [created]
env:
CARGO_TERM_COLOR: always
jobs:
build_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: 🔨 Build
run: cargo build
- name: ✔️ Tests
run: cargo test
bench:
runs-on: ubuntu-latest
needs: [build_test]
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- name: ⏲️ Bench
run: cargo bench
dry_publish:
runs-on: ubuntu-latest
needs: [build_test]
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
dry-run: true
publish:
runs-on: ubuntu-latest
needs: [dry_publish]
if: github.event_name == 'release' && github.event.action == 'created'
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
release:
runs-on: ubuntu-latest
name: release ${{ matrix.target }}
if: github.event_name == 'release' && github.event.action == 'created'
needs: [dry_publish]
strategy:
fail-fast: false
matrix:
target: [x86_64-pc-windows-gnu, x86_64-unknown-linux-musl, x86_64-apple-darwin]
steps:
- uses: actions/checkout@master
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
EXTRA_FILES: "README.md LICENSE"
TOOLCHAIN_VERSION: 1.74