Skip to content

Update Rust crate fake to 2.9.2 - autoclosed #88

Update Rust crate fake to 2.9.2 - autoclosed

Update Rust crate fake to 2.9.2 - autoclosed #88

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
env:
CARGO_TERM_COLOR: always
jobs:
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restcrab/target/
restcrab_macros/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- run: cargo fmt --check
- run: cargo clippy -- -D warnings
- run: cargo doc --no-deps
test-linux:
name: Test Suite Linux
runs-on: ubuntu-latest
needs: lint
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-unknown-linux-gnu
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restcrab/target/
restcrab_macros/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- run: cargo test
test-macos:
name: Test Suite Darwin
runs-on: macos-latest
needs: lint
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: x86_64-apple-darwin
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restcrab/target/
restcrab_macros/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- run: cargo test
test-windows:
name: Test Suite Windows
runs-on: windows-latest
needs: lint
strategy:
matrix:
target:
- x86_64-pc-windows-gnu
- x86_64-pc-windows-msvc
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
with:
target: ${{ matrix.target }}
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restcrab/target/
restcrab_macros/target/
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- run: cargo test
release:
name: Release
runs-on: ubuntu-latest
needs: [test-linux, test-macos, test-windows]
environment: crates
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
steps:
- name: Checkout sources
uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
restcrab/target/
restcrab_macros/target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.toml') }}
- run: cargo publish --dry-run -p restcrab_macros
- run: cargo publish --dry-run -p restcrab
- name: Create github Release
uses: docker://antonyurchenko/git-release:v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: cargo publish -p restcrab_macros
- run: cargo publish -p restcrab