MACI CI pipeline - privacy-scaling-explorations/maci Wiki

When pull request opened to the v1 branch or code is pushed to the v1 branch, it triggers CI server(GitHub Actions) to run tests for package-level and end-to-end.

Package-level test

The following packages will be tested when CI triggered:

  • Circuit
  • Contracts
  • Core
  • Crypto
  • Domainobjs

End-to-end test

It's a tests from a user's perspective processed on a single machine. Contracts will be deployed to the local EVM instance.

  1. Compile circuits and generate a .zkey files, ProcessMessages, TallyVotes and SubsidyPerBatch, with a testing parameters.
  2. Run all the bespoke tests under cli package.
  3. Run tests under integrationTests directory.

Test scenarios

Bespoke Tests

  • 1 signup, 1 message
  • 4 signups, 6 messages
  • 5 signups, 1 message
  • 8 signups, 10 messages
  • 4 signups, 4 messages
  • 5 signups, 5 messages
  • test if keys are set correctly given a set of files
  • test if key change works
  • multiple batch: Sign up 6 times, Publish 6 times
  • 1 signup and 1 valid message for multiple polls
  • 7 signups and 1 message, another polls and 6 messages

TODO: how to add bespoke tests

Integration Tests

See: https://github.com/appliedzkp/maci/blob/v1/integrationTests/ts/tests/suites.json