Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RC1] ComputeQuery changes for AxiomV2CircuitMetadata #7

Merged
merged 10 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 28 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,34 @@ on:
pull_request:

jobs:
build:
name: Jest Testing
circuit-js:
name: JS Circuit Tests
runs-on: ubuntu-latest

steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Use Node.js 18.x
uses: actions/setup-node@v2
with:
node-version: 18.x

- name: Install dependencies
working-directory: ./circuit/js
run: npm install

- name: Run Unit Tests
working-directory: ./circuit/js
run: |
export PROVIDER_URI_GOERLI=${{ secrets.PROVIDER_URI_GOERLI }}
ANVIL_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80
export PRIVATE_KEY=$ANVIL_PRIVATE_KEY # just needs to be in the correct format, no tx is sent in unit tests
export PRIVATE_KEY_GOERLI=$ANVIL_PRIVATE_KEY
npm run test

harness:
name: Harness Tests
runs-on: ubuntu-latest

steps:
Expand Down
16 changes: 16 additions & 0 deletions circuit/js/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/** @type {import('ts-jest').JestConfigWithTsJest} */
require('dotenv').config({
path: '.env.local'
});

module.exports = {
preset: 'ts-jest',
testEnvironment: 'node',
modulePathIgnorePatterns: ["<rootDir>/dist/"],
transform: {
'^.+\\.tsx?$': [
'ts-jest',
{tsconfig: './tsconfig.test.json'},
],
},
};
7 changes: 6 additions & 1 deletion circuit/js/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
"types": "web/index.d.ts",
"scripts": {
"build": "rm -rf ./dist/* && tsc && ts-node scripts/postTsc.js && $npm_execpath run build:docs",
"build:docs": "./scripts/buildDocs.sh"
"build:docs": "./scripts/buildDocs.sh",
"test": "jest"
},
"publishConfig": {
"directory": "dist"
Expand All @@ -32,10 +33,14 @@
"viem": "^1.19.9"
},
"devDependencies": {
"@types/jest": "^29.5.11",
"@types/node": "18.15.13",
"dotenv": "^16.3.1",
"dts-bundle-generator": "^9.0.0",
"jest": "^29.7.0",
"ts-jest": "^29.1.1",
"tslib": "^2.6.2",
"tsx": "^4.6.2",
"typescript": "^5.3.2"
}
}
Loading
Loading