From 3020d5a3244defe008c531f3d60af7d39d95639c Mon Sep 17 00:00:00 2001 From: Owen Qwen Date: Tue, 23 Jun 2026 22:00:37 -0500 Subject: [PATCH] Add CI workflow --- .github/workflows/ci.yml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..131baad --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,42 @@ +name: CI + +on: push + +permissions: + contents: read + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo artifacts + uses: Swatinem/rust-cache@v2 + + - name: Build all targets + run: cargo build --locked --all-targets + + test: + name: Test + runs-on: ubuntu-latest + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + + - name: Cache Cargo artifacts + uses: Swatinem/rust-cache@v2 + + - name: Run tests + run: cargo test --locked --all-targets