Skip to content

Commit beb9ab6

Browse files
committed
tasks: setup gas reporter config
1 parent 1bdf9cc commit beb9ab6

File tree

4 files changed

+12
-16
lines changed

4 files changed

+12
-16
lines changed

.github/workflows/ci-tasks.yml

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -24,19 +24,7 @@ jobs:
2424
# - name: Lint
2525
# run: yarn workspace @mimic-fi/v3-tasks lint
2626

27-
# test:
28-
# runs-on: ubuntu-latest
29-
# steps:
30-
# - name: Checkout
31-
# uses: actions/checkout@v3
32-
# - name: Set up environment
33-
# uses: ./.github/actions/setup
34-
# - name: Build
35-
# run: yarn build
36-
# - name: Test
37-
# run: yarn workspace @mimic-fi/v3-tasks test
38-
39-
gas:
27+
test:
4028
runs-on: ubuntu-latest
4129
steps:
4230
- name: Checkout
@@ -45,7 +33,9 @@ jobs:
4533
uses: ./.github/actions/setup
4634
- name: Build
4735
run: yarn build
36+
- name: Test
37+
run: REPORT_GAS=true yarn workspace @mimic-fi/v3-tasks test
4838
- name: Gas Report
4939
env:
50-
CC_SECRET: ${{ secrets.CODECHECKS_SECRET }}
51-
run: CI=true yarn workspace @mimic-fi/v3-tasks codechecks
40+
CC_SECRET: ${{ secrets.CODECHECKS_SECRET }}
41+
run: yarn workspace @mimic-fi/v3-tasks codechecks

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ build
55
dist
66
.certora_internal
77
.certora_recent_jobs.json
8+
gasReporterOutput.json
89
*.log

packages/tasks/hardhat.config.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import '@nomiclabs/hardhat-ethers'
22
import '@nomiclabs/hardhat-waffle'
33
import '@mimic-fi/v3-helpers/dist/tests'
44
import 'hardhat-local-networks-config-plugin'
5+
import 'hardhat-gas-reporter'
56

67
import { homedir } from 'os'
78
import path from 'path'
@@ -17,4 +18,8 @@ export default {
1718
},
1819
},
1920
},
21+
gasReporter: {
22+
outputFile: 'gasReporterOutput.json',
23+
enabled: !!process.env.REPORT_GAS
24+
},
2025
}

packages/tasks/test/base/BaseTask.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ import { Contract } from 'ethers'
1616

1717
import { deployEnvironment } from '../../src/setup'
1818

19-
describe('BaseTask', () => {
19+
describe.only('BaseTask', () => {
2020
let task: Contract
2121
let smartVault: Contract, authorizer: Contract, owner: SignerWithAddress
2222

0 commit comments

Comments
 (0)