This repository has been archived by the owner on Dec 10, 2024. It is now read-only.
feat: add cli reading #59
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
pull_request: | |
paths: | |
- "**.rs" | |
- "Cargo.toml" | |
- "Cargo.lock" | |
jobs: | |
fmt: | |
name: 👁️🗨️ Source formatting check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: nightly | |
override: true | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: -- --check | |
check: | |
name: 👁️🗨️ Compilation check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
rust: | |
- nightly | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Run cargo check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
clippy: | |
name: 👁️🗨️ Lint check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
rust: | |
- nightly | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
components: clippy | |
- name: Run lints | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: -- -D warnings | |
test: | |
name: 🧪 Test check | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: true | |
matrix: | |
rust: | |
- nightly | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Install Rust toolchain | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: ${{ matrix.rust }} | |
override: true | |
- name: Run test check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test |