From 05cdf31209a2e787fb31f84a3950c97f1a99a25b Mon Sep 17 00:00:00 2001 From: Jaydbrown Date: Mon, 15 Jun 2026 09:11:56 +0100 Subject: [PATCH] ci: add GitHub Actions workflow for contracts and frontend (#16) --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..27885d8 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: CI + +on: + push: + branches: [main] + pull_request: + branches: [main] + +jobs: + contracts: + name: Contracts (build · clippy · test) + runs-on: ubuntu-latest + defaults: + run: + working-directory: contracts + steps: + - uses: actions/checkout@v4 + + - uses: dtolnay/rust-toolchain@stable + with: + targets: wasm32-unknown-unknown + components: rustfmt, clippy + + - uses: Swatinem/rust-cache@v2 + with: + workspaces: contracts + + - name: Format check + run: cargo fmt --all -- --check + + - name: Clippy + run: cargo clippy --all-targets -- -D warnings + + - name: Test + run: cargo test + + - name: Build WASM + run: cargo build --release --target wasm32-unknown-unknown + + frontend: + name: Frontend (typecheck · lint · build) + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 9 + + - uses: actions/setup-node@v4 + with: + node-version: 20 + cache: pnpm + + - name: Install dependencies + run: pnpm install --frozen-lockfile + + - name: Typecheck + run: pnpm -r run typecheck + + - name: Lint + run: pnpm --filter frontend lint + + - name: Build + run: pnpm build