Skip to content

Merge pull request #3 from Matvey-Kuk/add-mcp-badge #80

Merge pull request #3 from Matvey-Kuk/add-mcp-badge

Merge pull request #3 from Matvey-Kuk/add-mcp-badge #80

Workflow file for this run

name: CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
test:
name: Test
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
rust: [stable]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
components: rustfmt, clippy
- name: Install just (Unix)
if: runner.os != 'Windows'
uses: extractions/setup-just@v1
- name: Install just (Windows)
if: runner.os == 'Windows'
run: |
$url = "https://github.com/casey/just/releases/latest/download/just-x86_64-pc-windows-msvc.zip"
$output = "just.zip"
Invoke-WebRequest -Uri $url -OutFile $output
Expand-Archive -Path $output -DestinationPath .
echo "$PWD" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.rust }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.rust }}-cargo-
- name: Check formatting
if: matrix.rust == 'stable'
run: cargo fmt --all -- --check
- name: Run clippy
if: matrix.rust == 'stable'
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Run tests
run: just test
- name: Build
run: just build
lint-commits:
name: Lint Commits
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install cocogitto
run: cargo install cocogitto
- name: Lint commits
run: cog check --from-latest-tag