enable tests in CI

This commit is contained in:
poma 2021-06-16 15:20:16 +03:00
parent e46e104872
commit c5eb273da4
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
3 changed files with 13 additions and 12 deletions

View File

@ -17,14 +17,14 @@ jobs:
node-version: 14
- run: yarn install
- run: yarn lint
# build is disabled until it's made non-interactive
# - run: yarn build
# - run: yarn test
# - name: Telegram Failure Notification
# uses: appleboy/telegram-action@0.0.7
# if: failure()
# with:
# message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
# format: markdown
# to: ${{ secrets.TELEGRAM_CHAT_ID }}
# token: ${{ secrets.TELEGRAM_BOT_TOKEN }}
- run: yarn download
- run: yarn build
- run: yarn test
- name: Telegram Failure Notification
uses: appleboy/telegram-action@0.0.7
if: failure()
with:
message: ❗ Build failed for [${{ github.repository }}](https://github.com/${{ github.repository }}/actions) because of ${{ github.actor }}
format: markdown
to: ${{ secrets.TELEGRAM_CHAT_ID }}
token: ${{ secrets.TELEGRAM_BOT_TOKEN }}

View File

@ -10,6 +10,7 @@
"circuit": "./scripts/buildCircuit.sh 2 && ./scripts/buildCircuit.sh 16",
"compile": "npx hardhat compile",
"build": "npm run circuit && npm run compile",
"download": "curl https://github.com/tornadocash/tornado-pool/releases/download/tmp/ptau15 --create-dirs -o artifacts/circuits/ptau15",
"test": "npx hardhat test",
"eslint": "eslint --ext .js --ignore-path .gitignore .",
"prettier:check": "prettier --check . --config .prettierrc",

View File

@ -10,7 +10,7 @@ if [ ! -f artifacts/circuits/ptau$POWERS_OF_TAU ]; then
fi
npx circom -v -r artifacts/circuits/transaction$1.r1cs -w artifacts/circuits/transaction$1.wasm -s artifacts/circuits/transaction$1.sym circuits/transaction$1.circom
npx snarkjs groth16 setup artifacts/circuits/transaction$1.r1cs artifacts/circuits/ptau$POWERS_OF_TAU artifacts/circuits/tmp_transaction$1.zkey
npx snarkjs zkey contribute artifacts/circuits/tmp_transaction$1.zkey artifacts/circuits/transaction$1.zkey
echo "qwe" | npx snarkjs zkey contribute artifacts/circuits/tmp_transaction$1.zkey artifacts/circuits/transaction$1.zkey
npx snarkjs zkey export solidityverifier artifacts/circuits/transaction$1.zkey artifacts/circuits/Verifier$1.sol
sed -i.bak "s/contract Verifier/contract Verifier${1}/g" artifacts/circuits/Verifier$1.sol
#zkutil setup -c artifacts/circuits/transaction$1.r1cs -p artifacts/circuits/transaction$1.params