mirror of
https://github.com/tuono-labs/tuono
synced 2026-07-25 21:02:45 -07:00
54 lines
1003 B
YAML
54 lines
1003 B
YAML
name: Rust CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '.github/**'
|
|
- 'crates/**'
|
|
pull_request:
|
|
paths:
|
|
- '.github/**'
|
|
- 'crates/**'
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
build_and_test:
|
|
name: Build and test rust crates
|
|
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
os:
|
|
- 'ubuntu-latest'
|
|
- 'macos-latest'
|
|
- 'windows-latest'
|
|
toolchain:
|
|
- stable
|
|
- beta
|
|
- nightly
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
|
- run: cargo build --verbose
|
|
- run: cargo test --verbose
|
|
|
|
lint_and_fmt:
|
|
name: Check format and lint rust crates
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- run: cargo fmt --all -- --check
|
|
- run: cargo clippy -- -D warnings
|