From bc618fbb6e774e3498dc1d4e596a6465b5a71191 Mon Sep 17 00:00:00 2001 From: Erik Grinaker Date: Wed, 1 May 2024 19:59:33 +0200 Subject: [PATCH] .github: add CI action --- .github/workflows/ci.yml | 25 +++++++++++++++++++++++++ README.md | 2 ++ 2 files changed, 27 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..a57072b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: CI +on: [push, pull_request, workflow_dispatch] +permissions: + contents: read + +jobs: + test: + name: Test + runs-on: ubuntu-latest + timeout-minutes: 10 + + steps: + - uses: actions/checkout@v4 + - uses: dtolnay/rust-toolchain@1.77.0 + id: toolchain + with: + components: clippy, rustfmt + - uses: actions/cache@v4 + with: + path: target + key: ${{runner.os}}-target-${{steps.toolchain.outputs.cachekey}}-${{hashFiles('Cargo.lock')}} + - run: cargo build --tests + - run: cargo test + - run: cargo clippy --tests --no-deps -- -D warnings + - run: cargo fmt --check \ No newline at end of file diff --git a/README.md b/README.md index 1425a1b..e9c4aed 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # Goldenscript +[![CI](https://github.com/erikgrinaker/toydb/actions/workflows/ci.yml/badge.svg)](https://github.com/erikgrinaker/toydb/actions/workflows/ci.yml) + A Rust testing framework loosely based on Cockroach Labs' [`datadriven`](https://github.com/cockroachdb/datadriven) framework for Go. It combines several testing techniques that make it easy and efficient to write and