Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
7f3dad9
feat(circuit): add circuit and circuit test
99Kies Oct 29, 2025
beb1199
feat(circuit): Reorganize the folders
99Kies Nov 3, 2025
43e7eaf
feat: add operator client and update more circuit test file
99Kies Nov 7, 2025
eaba7e7
feat: update pack and circuit test file
99Kies Nov 13, 2025
2e16364
feat(contract): init
99Kies Nov 13, 2025
93bb04e
add e2e module
99Kies Nov 14, 2025
809f6aa
feat(e2e): update maci test
99Kies Nov 14, 2025
a2adac2
feat(e2e): fix amaci test
99Kies Nov 14, 2025
3bda138
feat(e2e): update maci and amaci e2e test
99Kies Nov 15, 2025
75aa8ad
feat: update voter state query and update e2e test
99Kies Nov 15, 2025
7de4a36
feat: update contract uitls and poseidon e2e test
99Kies Nov 16, 2025
20ba575
feat: update test file
99Kies Nov 16, 2025
96e42f0
feat(cicd): support test
99Kies Nov 16, 2025
9546d56
feat(cicd): fix contract test
99Kies Nov 16, 2025
74151ec
feat(cicd): fix test
99Kies Nov 16, 2025
56f8fb3
feat(cicd): fix test
99Kies Nov 16, 2025
f04ebc5
feat(cicd): fix test
99Kies Nov 16, 2025
9cd243e
feat(cicd): fix test
99Kies Nov 16, 2025
e553522
feat(cicd): fix e2e test
99Kies Nov 17, 2025
a6d00a0
feat(cicd): fix e2e test
99Kies Nov 17, 2025
e2f9c06
fix: upgrade Node.js version to 22 in CI/CD to match local environment
99Kies Nov 17, 2025
b90620e
fix: update circom install
99Kies Nov 17, 2025
f97e945
fix: update e2e wasm name load
99Kies Nov 17, 2025
fa1eb83
fix: update address prefix
99Kies Nov 17, 2025
57cc4c7
feat: support batch publish message func
99Kies Nov 19, 2025
207f1f0
merge main api saas addr
99Kies Nov 19, 2025
9becbeb
code fmt
99Kies Nov 19, 2025
b028245
feat(sdk): update vote func
99Kies Nov 19, 2025
e4059ae
code fmt
99Kies Nov 19, 2025
5b579ea
feat(amaci): update publish message batch params
99Kies Nov 19, 2025
6a41b73
feat: support publish message batch in sdk
99Kies Nov 19, 2025
8ce9baa
feat(sdk): fix message parse bug
99Kies Nov 19, 2025
1ba5fd3
merge main
99Kies Nov 19, 2025
c93ab8c
update readme
99Kies Nov 19, 2025
a5caea0
some nits
99Kies Nov 19, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
4 changes: 4 additions & 0 deletions .cargo/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[alias]
wasm = "build --release --lib --target wasm32-unknown-unknown"
unit-test = "test --lib"
schema = "run --bin schema"
115 changes: 115 additions & 0 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,115 @@
# CI/CD Workflow Documentation

This directory contains CI/CD configuration files for GitHub Actions.

## test.yml - Automated Testing Workflow

### Trigger Conditions
- `push` events on all branches (including pushes after PR merge)

### Test Jobs

The workflow contains three test jobs that run in parallel:

#### 1. Contract Tests
- **Runtime Environment**: Ubuntu Latest
- **Duration**: Approximately 10-20 minutes
- **Steps**:
1. Setup Rust 1.79.0 toolchain
2. Configure Cargo cache (to speed up subsequent builds)
3. Run command: `cargo test --lib -- --nocapture`

#### 2. E2E Tests
- **Runtime Environment**: macOS-14 (Apple Silicon M1/M2)
- **Duration**: Approximately 40-60 minutes
- **Steps**:
1. Setup Rust toolchain
2. Compile contract WASM files using Docker + rust-optimizer
3. Setup Node.js 22 and pnpm 9.12.3
4. Download and cache circuit zkey files (approximately 100MB)
5. Install dependencies and run e2e tests

**Notes**:
- First run requires contract compilation (approximately 15-20 minutes)
- First run requires downloading zkey files (approximately 5-10 minutes)
- Subsequent runs use cache and are faster
- Circuit files are cached to avoid repeated downloads

#### 3. Circuits Tests
- **Runtime Environment**: Ubuntu Latest
- **Duration**: Approximately 10-15 minutes
- **Steps**:
1. Setup Node.js 22 and pnpm 9.12.3
2. Install dependencies
3. Run circuits tests

### Caching Strategy

The following caches are configured to speed up CI runs:

1. **Cargo Cache**:
- `~/.cargo/registry` - Cargo registry
- `~/.cargo/git` - Cargo git dependencies
- `target/` - Build artifacts

2. **pnpm Cache**:
- pnpm store - Node.js dependencies

3. **Circuit Files Cache**:
- `e2e/circuits/` - zkey and wasm files

### Estimated Total Duration

- **First Run**: Approximately 60 minutes (parallel execution)
- **Subsequent Runs**: Approximately 20-30 minutes (benefiting from cache)

### Viewing Test Results

1. Go to the GitHub repository
2. Click on the "Actions" tab
3. Select the corresponding workflow run
4. View the execution status and logs for each job

### Local Testing

Before committing, you can run the same tests locally:

```bash
# Contract tests
cargo test --lib -- --nocapture

# E2E tests
cd e2e
pnpm install
pnpm setup-circuits # Required for first run
pnpm test

# Circuits tests
cd packages/circuits
pnpm install
pnpm test
```

### Troubleshooting

#### E2E Test Failures
- Check if contracts compiled successfully
- Check if circuit files downloaded successfully
- Review specific test logs

#### Circuits Test Failures
- Check if Node.js has sufficient memory
- Review specific test case failure reasons

#### Cache Issues
If cache causes issues, you can clear the cache in the GitHub Actions page:
1. Settings -> Actions -> Caches
2. Delete relevant caches
3. Re-run the workflow

### Maintenance

- Regularly check for dependency updates
- Update Rust toolchain version (`rust-toolchain.toml`)
- Update Node.js version
- Update pnpm version
Loading