Skip to content

Commit

Permalink
Improving CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ndefokou committed Nov 15, 2024
1 parent c7d7ea9 commit d485d74
Showing 1 changed file with 26 additions and 9 deletions.
35 changes: 26 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,19 @@
name: Rust CI

on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
branches:
- main

env:
CARGO_TERM_COLOR: always

jobs:
build:
name: Build and Test
name: Build, Test, and Lint
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -35,14 +41,25 @@ jobs:
rustflags:

- name: Install Nextest test runner
uses: taiki-e/install-action@nextest
run: cargo install cargo-nextest

- name: Create example env file
run: |
chmod +x .github/scripts/test_config.sh
sh .github/scripts/test_config.sh
if [ -f .github/scripts/test_config.sh ]; then
chmod +x .github/scripts/test_config.sh
sh .github/scripts/test_config.sh
else
echo "No test_config.sh script found, skipping..."
fi
- name: Build and Run Test
run: |
cargo build --workspace --all-features
cargo nextest run --workspace --all-features
- name: Run Clippy (Lint)
run: cargo clippy --workspace --all-targets --all-features -- -D warnings

- name: Check Formatting
run: cargo fmt --all -- --check

- name: Build Project
run: cargo build --workspace --all-features

- name: Run Tests
run: cargo nextest run --workspace --all-features

0 comments on commit d485d74

Please sign in to comment.