From 71ec45c6b0bbf9737e79e4f837f54064f27b6256 Mon Sep 17 00:00:00 2001 From: Abigail Emery Date: Fri, 3 Oct 2025 14:02:48 +0100 Subject: [PATCH] Add initial ci lint and test --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 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..fcf9928 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,48 @@ +name: Glazed CI + +on: + push: + branches: + - main + pull_request: + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: nightly + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + - name: Check formatting + # Use nightly for formatting to enable unstable formatting styles + # * group imports + # * import_granularity + run: cargo +nightly fmt -- --check + - name: Clippy + run: | + cargo --version + cargo clippy --version + cargo clippy --all-targets --all-features -- --deny warnings + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + - uses: Swatinem/rust-cache@v2 + + - name: Build Everything + run: cargo build --all-targets + - name: Run tests + run: cargo test --all-targets --verbose + # Ensure that no files (most likely the Cargo.lock file) have changed + - name: Unstaged Changes + run: git diff --exit-code \ No newline at end of file