ci: add tutorial tests #1935
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test-Tutorials | |
on: | |
push: | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
example-path: | |
- examples/zkapps/01-hello-world | |
- examples/zkapps/02-private-inputs-and-hash-functions | |
- examples/zkapps/05-common-types-and-functions | |
- examples/zkapps/10-account-updates | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Install dependencies at root level | |
run: npm ci | |
- name: Set Git config (global) | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "Test" | |
- name: Install and run build for ${{ matrix.example-path }} | |
run: | | |
cd ${{ matrix.example-path }} | |
npm ci | |
npm run build | |
node build/src/main.js |