From 4f637c1e1b27462eeb0a1c1dcbf0a17c45bbe7ef Mon Sep 17 00:00:00 2001 From: iff Date: Sat, 5 Apr 2025 00:14:48 +0200 Subject: [PATCH] chore: makefile and CI test --- .github/workflows/{rust.yml => test.yml} | 8 ++++---- Makefile | 23 +++++++++++++++++++++++ 2 files changed, 27 insertions(+), 4 deletions(-) rename .github/workflows/{rust.yml => test.yml} (82%) create mode 100644 Makefile diff --git a/.github/workflows/rust.yml b/.github/workflows/test.yml similarity index 82% rename from .github/workflows/rust.yml rename to .github/workflows/test.yml index 7c1a1b5..42712ea 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/test.yml @@ -1,4 +1,4 @@ -name: Rust +name: Test on: push: @@ -11,7 +11,7 @@ env: CARGO_INCREMENTAL: 0 jobs: - build: + build-and-test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -24,6 +24,6 @@ jobs: - name: Build run: cargo build --verbose - - name: Run tests - run: cargo test --verbose + - name: Tests + run: make test diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..191524f --- /dev/null +++ b/Makefile @@ -0,0 +1,23 @@ +build: + cargo build + +release: + cargo build --release + +test-rust: build + cargo test --verbose + +install: + echo "Installing pay-respects core. Use `install-all` to install all modules." + cargo install --path core + +install-all: + echo "Installing pay-respects core and all modules." + cargo install --path core + cargo install --path module-runtime-rules + cargo install --path module-request-ai + +test-suggestions: build + cd tests && bash main.sh + +test: test-rust test-suggestions