From b29d72e081f26d172a254668d1e131b23e01df1c Mon Sep 17 00:00:00 2001 From: Matthew Treinish Date: Mon, 8 Jan 2024 13:56:49 -0500 Subject: [PATCH] Add basic CI configuration This commit adds a basic initial CI configuration. This just adds a single job that tests a build, runs `cargo fmt` and `cargo clippy` to ensure consistent formatting and style, and then runs the unittests. This provides coverage of the repo basics and we can expand and tweak this over time as the library evolves. --- .github/workflows/main.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..56684d5 --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,27 @@ +--- +name: Rust + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Rust Format + run: cargo fmt --all -- --check + - name: Build + run: cargo build --verbose + - name: Clippy + run: cargo clippy -- -D warnings + - name: Run tests + run: cargo test --verbose