Skip to content

Adds test directory and CI files #1

Adds test directory and CI files

Adds test directory and CI files #1

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
env:
RUST_BACKTRACE: 1
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
- uses: Swatinem/rust-cache@v2
- name: Install libclang
run: sudo apt-get update -qq && sudo apt-get install -y libclang-dev
- name: Check formatting
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy --all-targets -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Install libclang
run: sudo apt-get update -qq && sudo apt-get install -y libclang-dev
- name: Verify Cargo.lock exists
run: test -f Cargo.lock || (echo "::error::Cargo.lock is missing" && exit 1)
- name: Run tests
run: cargo test --locked