Skip to content

Commit

Permalink
adds github ci workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
douglance committed Sep 15, 2023
1 parent e54bc24 commit ecc7599
Show file tree
Hide file tree
Showing 5 changed files with 669 additions and 699 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/unit-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: unit-test

on: [push]

jobs:
unitTests:
name: 'unit tests'
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3

- name: Install Yarn
run: npm install -g yarn

- name: Install node_modules with Yarn
run: yarn install

- name: run unit tests
run: yarn test:ci
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const createJestConfig = nextJest({ dir: './' });
const customJestConfig = {
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testEnvironment: 'jest-environment-jsdom',
preset: 'ts-jest',
};

module.exports = createJestConfig(customJestConfig);
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"start": "next start",
"lint": "next lint",
"prettier:format": "prettier --config-precedence file-override --write \"src/**/*.{tsx,ts,scss,md,json}\"",
"test": "jest --watch"
"test": "jest --watch",
"test:ci": "jest"
},
"dependencies": {
"@ethersproject/providers": "^5.7.2",
Expand Down Expand Up @@ -52,6 +53,7 @@
"prettier": "^2.8.8",
"prettier-plugin-tailwindcss": "^0.3.0",
"tailwindcss": "3.3.2",
"ts-jest": "^29.1.1",
"typescript": "5.0.4"
}
}
}
2 changes: 1 addition & 1 deletion src/utils/__test__/__mocks__/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
export const rollupConfig = {
confirmPeriodBlocks: 150,
stakeToken: '0x0000000000000000000000000000000000000000',
baseStake: '0.1',
baseStake: 0.1,
owner: '0xF27c2fEfe6a39aa08763e504b44133CD992dd0f3',
extraChallengeTimeBlocks: 0,
wasmModuleRoot: '0xda4e3ad5e7feacb817c21c8d0220da7650fe9051ece68a3f0b1c5d38bbb27b21',
Expand Down
Loading

0 comments on commit ecc7599

Please sign in to comment.