Reflect o1js node engines requirements. #2257
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
# | |
# ci.yml | |
# | |
# Run tests for all pushed commits and opened pull requests on Github. | |
# | |
name: CI | |
on: [push, pull_request] | |
jobs: | |
ci: | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
strategy: | |
matrix: | |
node: [18] | |
steps: | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: NPM ci, build, & test | |
run: | | |
npm ci | |
npm run build --if-present | |
npm run test | |
cd templates/project-ts | |
npm install || true | |
npm run test | |
env: | |
CI: true | |
sudoku-example: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18] | |
steps: | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: NPM ci, build, & test | |
run: | | |
npm ci | |
npm run build --if-present | |
npm link | |
zk example sudoku | |
cd sudoku | |
npm run test | |
npm run build | |
npm run start | |
env: | |
CI: true | |
tictactoe-example: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node: [18] | |
steps: | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: NPM ci, build, & test | |
run: | | |
npm ci | |
npm run build --if-present | |
npm link | |
zk example tictactoe | |
cd tictactoe | |
npm run test | |
npm run build | |
npm run start | |
env: | |
CI: true | |
publish: | |
if: github.ref == 'refs/heads/main' | |
runs-on: ubuntu-latest | |
# TODO: Add successful e2e smoke testing to preconditions after the https://github.com/o1-labs/zkapp-cli/issues/615 is resolved | |
needs: [ci, sudoku-example, tictactoe-example] | |
strategy: | |
matrix: | |
node: [18] | |
steps: | |
- name: Set up NodeJS | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: NPM ci & build | |
run: | | |
npm ci | |
npm run build --if-present | |
- name: Publish to NPM if version has changed | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
env: | |
INPUT_TOKEN: ${{ secrets.NPM_TOKEN }} |