mirror of
https://github.com/youwen5/iamb.git
synced 2025-06-20 05:39:52 -07:00
60 lines
1.3 KiB
YAML
60 lines
1.3 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
name: CI
|
|
|
|
jobs:
|
|
clippy_check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v1
|
|
with:
|
|
submodules: true
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
components: clippy
|
|
override: true
|
|
- name: Check Clippy
|
|
uses: actions-rs/clippy-check@v1
|
|
with:
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
|
toolchain: stable
|
|
args:
|
|
test:
|
|
strategy:
|
|
matrix:
|
|
platform: [ubuntu-latest, windows-latest, macos-latest]
|
|
runs-on: ${{ matrix.platform }}
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: true
|
|
- name: Install Rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: nightly
|
|
override: true
|
|
components: rustfmt, clippy
|
|
- name: Cache cargo registry
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: ~/.cargo/registry
|
|
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
|
|
- name: Check formatting
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: fmt
|
|
args: --all -- --check
|
|
- name: Run tests
|
|
uses: actions-rs/cargo@v1
|
|
with:
|
|
command: test
|