Skip to content

Commit

Permalink
update CI and Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
mazznoer committed Aug 20, 2024
1 parent 31bd7b5 commit 7f10844
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 20 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
run: |
cargo build --verbose --no-default-features
cargo build --verbose --all-features
cargo build --examples
- name: Run tests
run: |
Expand All @@ -37,24 +38,25 @@ jobs:
cargo clippy --all-features -- -D warnings
- name: Run cargo fmt
run: cargo fmt --all -- --check
run: |
cargo fmt --all -- --check
- name: Run lolcrab
if: matrix.os != 'windows-latest'
run: |
echo "Version" && \
./target/debug/lolcrab --version && \
echo "Help" && \
./target/debug/lolcrab --help && \
echo "Test" && \
echo "Version"
./target/debug/lolcrab --version
echo "Help"
./target/debug/lolcrab --help
echo "Test"
./target/debug/lolcrab <<< "Make your life more colorful"
- name: Run lolcrab (Windows)
if: matrix.os == 'windows-latest'
run: >
echo "Version" &&
target/debug/lolcrab --version &&
echo "Help" &&
target/debug/lolcrab --help &&
echo "Test" &&
run: |
echo "Version"
target/debug/lolcrab --version
echo "Help"
target/debug/lolcrab --help
echo "Test"
echo "Make your life more colorful" | target/debug/lolcrab
20 changes: 12 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
SHELL := /bin/bash

.PHONY: all check test
.PHONY: all lib bin

all: check test
all: lib bin

check:
cargo build --all-features && \
cargo clippy --all-features -- -D warnings && \
cargo fmt --all -- --check
lib:
cargo build --no-default-features && \
cargo clippy --no-default-features -- -D warnings && \
cargo fmt --all -- --check && \
cargo test --no-default-features

test:
cargo test --all-features
bin:
cargo build && \
cargo clippy -- -D warnings && \
cargo fmt --all -- --check && \
cargo test

0 comments on commit 7f10844

Please sign in to comment.