Skip to content

Commit

Permalink
start workflow defs with clippy + unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katiemckeon committed Jan 11, 2025
1 parent 0fe0bc4 commit cc3d030
Showing 1 changed file with 56 additions and 0 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: CI Workflows

on:
push:
branches: [ "main" ]
pull_request:
# Do not run on draft pull requests
types:
- opened
- reopened
- synchronize
- ready_for_review

jobs:
lint-and-test:
runs-on: ubuntu-latest
# Do not run on draft pull requests
if: ${{ github.event_name == 'push' || !github.event.pull_request.draft }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
override: true

- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-index-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-index-
- name: Install Clippy
run: rustup component add clippy

- name: Run Clippy
run: cargo clippy

- name: Build
run: cargo build --verbose

- name: Run sindri-rs unit tests
run: cargo test --package sindri-rs --lib --verbose

0 comments on commit cc3d030

Please sign in to comment.