Kind2/.github/workflows/cargo.yml
2023-01-16 09:20:12 -03:00

60 lines
1.4 KiB
YAML

name: Cargo
on:
workflow_call:
jobs:
cargo_check:
name: 👁️‍🗨️ Cargo Check
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v1
- uses: actions-rs/cargo@v1
with:
command: check
cargo_test:
name: 🧪 Cargo Test
runs-on: ${{ matrix.os }}
timeout-minutes: 10
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
- uses: Swatinem/rust-cache@v2
- uses: actions-rs/cargo@v1
with:
command: test
# cargo_fmt:
# name: 💅 Cargo Fmt
# continue-on-error: true
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - uses: actions-rs/toolchain@v1
# with:
# profile: minimal
# toolchain: stable
# override: true
# - run: rustup component add rustfmt
# - uses: actions-rs/cargo@v1
# with:
# command: fmt
# args: --all -- --check