Skip to content

Commit

Permalink
ci: add tutorial tests
Browse files Browse the repository at this point in the history
  • Loading branch information
boray committed Oct 2, 2024
1 parent ece2e8b commit 70915b3
Showing 1 changed file with 29 additions and 8 deletions.
37 changes: 29 additions & 8 deletions .github/workflows/test-tutorials.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,37 @@ on:
push:

jobs:
hello-world:
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:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v3
with:
# In case of version change, update README.md accordingly
node-version: 18
- run: |
npm ci
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"
npx ts-node scripts/tutorial-runner.ts docs/zkapps/tutorials/01-hello-world.mdx
- name: Install and run build for ${{ matrix.example-path }}
run: |
cd ${{ matrix.example-path }}
npm ci
npm run build
node build/src/main.js

0 comments on commit 70915b3

Please sign in to comment.