Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,14 @@ jobs:
restore-keys: |
${{ runner.os }}-cargo-

- name: Check cargo build
run: ./scripts/build.sh

- name: Check formatting
run: cargo fmt --all --check
run: ./scripts/fmt.sh

- name: Run clippy
run: cargo clippy --all-targets --all-features -- -D warnings
run: ./scripts/clippy.sh

- name: Run tests
run: cargo test --all
run: ./scripts/test.sh
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail

cargo build --all-features
4 changes: 4 additions & 0 deletions scripts/clippy.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail

cargo clippy --all-targets --all-features -- -D warnings
4 changes: 4 additions & 0 deletions scripts/fmt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail

cargo fmt --all --check
18 changes: 18 additions & 0 deletions scripts/local-ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/bash
set -euo pipefail

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

echo "==> Running build..."
"$SCRIPT_DIR/build.sh"

echo "==> Checking formatting..."
"$SCRIPT_DIR/fmt.sh"

echo "==> Running clippy..."
"$SCRIPT_DIR/clippy.sh"

echo "==> Running tests..."
"$SCRIPT_DIR/test.sh"

echo "==> All checks passed!"
4 changes: 4 additions & 0 deletions scripts/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
set -euo pipefail

cargo test --all