diff --git a/.github/workflows/contract.yml b/.github/workflows/contract.yml new file mode 100644 index 0000000..6a8a376 --- /dev/null +++ b/.github/workflows/contract.yml @@ -0,0 +1,36 @@ +name: Test Contract + +on: + push: + branches: [ main ] + pull_request: + + workflow_dispatch: +# schedule: +# - cron: "0 6 * * *" + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +env: + RUSTFLAGS: -C debuginfo=0 # Do not produce debug symbols to keep memory usage down + RUST_BACKTRACE: 1 + +jobs: + test: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Rust + run: rustup show + + - name: Cache Rust + uses: Swatinem/rust-cache@v2 + with: + save-if: ${{ github.ref_name == 'main' }} + + - name: Compile and tests + run: cargo test diff --git a/.github/workflows/test.yml b/.github/workflows/events.yml similarity index 95% rename from .github/workflows/test.yml rename to .github/workflows/events.yml index 28893db..5cfd2b0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/events.yml @@ -1,11 +1,13 @@ -# Tests using docker compose. -name: Test +name: Test Events + +permissions: + contents: read on: push: branches: [ main ] pull_request: - branches: [ main ] + workflow_dispatch: # schedule: # - cron: "0 6 * * *" diff --git a/Makefile b/Makefile index 7aa2b20..d87eff5 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,4 @@ -.PHONY: help install prepare fmt clean build test build-release deploy contract_help +.PHONY: help install prepare rust-lint clean contract_build contract_test contract_deploy contract_help .DEFAULT_GOAL := help SHELL:=/bin/bash