mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
58 lines
1.1 KiB
YAML
58 lines
1.1 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust stable
|
|
uses: dtolnay/rust-toolchain@stable
|
|
|
|
- name: Cache cargo + target
|
|
uses: swatinem/rust-cache@v2
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check
|
|
|
|
- name: Clippy
|
|
run: cargo clippy -- -D warnings
|
|
|
|
- name: Test
|
|
run: cargo test
|
|
|
|
- name: Package
|
|
run: cargo package --locked
|
|
|
|
- name: Install Smoke
|
|
run: |
|
|
root="$(mktemp -d)"
|
|
cargo install --path . --locked --root "$root"
|
|
"$root/bin/idx" version
|
|
scripts/live-smoke.sh --bin "$root/bin/idx" --no-build --mode mock
|
|
|
|
nix:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Nix
|
|
uses: cachix/install-nix-action@v30
|
|
|
|
- name: Build default package
|
|
run: nix build .#default
|
|
|
|
- name: Run default app
|
|
run: nix run .#default -- version
|