You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
1.2 KiB

4 years ago
4 years ago
  1. name: Test
  2. on: [push, pull_request]
  3. jobs:
  4. test:
  5. # matrix strategy from: https://github.com/mvdan/github-actions-golang/blob/master/.github/workflows/test.yml
  6. strategy:
  7. matrix:
  8. go-version: [1.13.x, 1.14.x]
  9. platform: [ubuntu-latest]
  10. runs-on: ${{ matrix.platform }}
  11. steps:
  12. - name: Install Go
  13. uses: actions/setup-go@v1
  14. with:
  15. go-version: ${{ matrix.go-version }}
  16. - name: Install Nodejs
  17. uses: actions/setup-node@v1
  18. with:
  19. go-version: 10.x
  20. - name: Install circom
  21. run: npm install -g circom
  22. - name: Install snarkjs
  23. run: npm install -g snarkjs
  24. - name: Checkout code
  25. uses: actions/checkout@v2
  26. - name: Compile circuits and execute Go tests
  27. run: |
  28. cd testdata && sh ./compile-circuits.sh && cd ..
  29. go run cli/cli.go -prove -provingkey=testdata/circuit1k/proving_key.json -witness=testdata/circuit1k/witness.json -proof=testdata/circuit1k/proof.json -public=testdata/circuit1k/public.json
  30. go run cli/cli.go -prove -provingkey=testdata/circuit5k/proving_key.json -witness=testdata/circuit5k/witness.json -proof=testdata/circuit5k/proof.json -public=testdata/circuit5k/public.json
  31. go test ./...