Skip to content

Commit

Permalink
add CI flow and comment test require changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phn210 committed Mar 8, 2024
1 parent d3c345d commit 4d191d7
Show file tree
Hide file tree
Showing 11 changed files with 513 additions and 493 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# ci.yml
#
# Run tests for all pushed commits and opened pull requests on Github.
#

name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 10
strategy:
matrix:
node-version: [18.x, 20.x]
steps:
- name: Clean global cache
run: npm cache clean --force
- name: Set up Node
uses: actions/checkout@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install dependencies
run: npm install
- name: CI build & test
run: |
npm run build --if-present
npm test
env:
CI: true
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ node_modules
build
coverage
.husky
caches

# Editor
.vscode
Expand Down
8 changes: 4 additions & 4 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
"semi": true,
"singleQuote": true,
"tabWidth": 4,
"trailingComma": "es5"
}
5 changes: 3 additions & 2 deletions jest.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ export default {
useESM: true,
},
},
testTimeout: 2_000_000,
testTimeout: 1_000_000,
transform: {
'^.+\\.(t)s$': 'ts-jest',
'^.+\\.(j)s$': 'babel-jest',
Expand All @@ -17,7 +17,8 @@ export default {
transformIgnorePatterns: [
'<rootDir>/node_modules/(?!(tslib|o1js/node_modules/tslib))',
],
modulePathIgnorePatterns: ['<rootDir>/build/'],
modulePaths: ['<rootDir>/build/esm/'],
modulePathIgnorePatterns: ['<rootDir>/build/cjs'],
moduleNameMapper: {
'^(\\.{1,2}/.+)\\.js$': '$1',
},
Expand Down
6 changes: 3 additions & 3 deletions src/scripts/Committee.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,12 @@ describe('Committee', () => {

// beforeEach(() => {});

it('compile proof', async () => {
xit('compile proof', async () => {
// compile proof
await RollupCommittee.compile();
});

it('Create committee consist of 2 people with threshold 1, and test deploy DKG', async () => {
xit('Create committee consist of 2 people with threshold 1, and test deploy DKG', async () => {
let arrayAddress = [];
arrayAddress.push(addresses.p1, addresses.p2);
myMemberArray1 = new MemberArray(arrayAddress);
Expand Down Expand Up @@ -118,7 +118,7 @@ describe('Committee', () => {
await tx.sign([feePayerKey]).send();
});

it('create proof first step...', async () => {
xit('create proof first step...', async () => {
// create first step proof
proof = await RollupCommittee.firstStep(
Reducer.initialActionState,
Expand Down
4 changes: 2 additions & 2 deletions src/scripts/DKG.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ import { UpdateRequest, RequestContract } from '../contracts/Request.js';
import { packIndexArray } from '../libs/utils.js';
import { ResponseContributionStorage } from '../storages/RequestStorage.js';

describe('DKG', () => {
xdescribe('DKG', () => {
const doProofs = false;
const profiling = false;
const logMemory = false;
Expand Down Expand Up @@ -453,7 +453,7 @@ describe('DKG', () => {
let tx = await Mina.transaction(feePayerKey.publicKey, () => {
AccountUpdate.fundNewAccount(feePayerKey.publicKey);
requestContract.deploy();
// requestContract.responeContractAddress.set(
// requestContract.responseContractAddress.set(
// contracts[Contract.REQUEST].contract.address
// );
let feePayerAccount = AccountUpdate.createSigned(
Expand Down
2 changes: 1 addition & 1 deletion src/scripts/DKG.ts
Original file line number Diff line number Diff line change
Expand Up @@ -672,7 +672,7 @@
// // () => {
// // AccountUpdate.fundNewAccount(feePayerKey.publicKey);
// // requestContract.deploy();
// // requestContract.responeContractAddress.set(
// // requestContract.responseContractAddress.set(
// // contracts[Contract.REQUEST].contract.address
// // );
// // let feePayerAccount = AccountUpdate.createSigned(feePayerKey.publicKey);
Expand Down
Loading

0 comments on commit 4d191d7

Please sign in to comment.