Skip to content

Pre working step

Pre working step #227

Workflow file for this run

name: TS Lint and Typecheck
on: [push]
jobs:
lint-and-typecheck:
name: Lint and Typecheck
runs-on: ubuntu-latest
environment: CI
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Enable Corepack and Install Yarn 4
run: |
corepack enable
yarn set version latest
- name: Install Dependencies
run: yarn install
- name: Run TypeScript Linter
run: yarn lint:all
# We don't store circuit and smart contract compilation artefacts in the repo,
# but typecheck fails on import without them so we just create fake files here
- name: Create fake circuit compilation artefacts
working-directory: .
run: |
mkdir -p target
touch target/main.json
- name: Create fake smart contract build artefacts
working-directory: .
run: |
mkdir -p ethereum_history_api/contracts/out/UltraVerifier.sol
echo '{ "abi": [], "bytecode": { "object": "" } }' > ethereum_history_api/contracts/out/UltraVerifier.sol/UltraVerifier.json
- name: Run TypeScript Typecheck
run: yarn typecheck:all
- name: Run TypeScript format check
run: yarn format:all:ci