Skip to content

Commit

Permalink
ci: setup bulloak in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
0xteddybear committed Jul 2, 2024
1 parent 2dcd8fa commit cf9a4d3
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 6 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ jobs:
run: yarn test:integration

lint:
name: Lint Commit Messages
name: Static Analysis
runs-on: ubuntu-latest

steps:
Expand All @@ -148,7 +148,15 @@ jobs:
node-version: 20.x
cache: 'yarn'

- name: Install bulloak
uses: baptiste0928/cargo-install@v3
with:
crate: bulloak

- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1

- run: yarn lint:check
- run: yarn lint:check

- name: Run bulloak check
run: yarn lint:bulloak
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"lint:check": "yarn lint:sol-tests && yarn lint:sol-logic && forge fmt --check",
"lint:fix": "sort-package-json && forge fmt && yarn lint:sol-tests --fix && yarn lint:sol-logic --fix",
"lint:natspec": "npx @defi-wonderland/natspec-smells --config natspec-smells.config.js",
"lint:bulloak": "find test/unit -name '*.tree' | xargs bulloak check",
"lint:sol-logic": "solhint -c .solhint.json 'src/**/*.sol' 'script/**/*.sol'",
"lint:sol-tests": "solhint -c .solhint.tests.json 'test/**/*.sol'",
"prepare": "husky install",
Expand Down
8 changes: 4 additions & 4 deletions test/unit/Greeter.tree
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Greeter::constructor
UnitGreeter::constructor
├── when passing valid greeting string
│ ├── it deploys
│ ├── it sets the greeting string
Expand All @@ -8,18 +8,18 @@ Greeter::constructor
└── it reverts


Greeter::greet
UnitGreeter::greet
└── when called
├── it returns the greeting string
└── it returns the token balance of the contract


Greeter::setGreeting
UnitGreeter::setGreeting
├── when called by the owner
│ ├── when passing a valid greeting string
│ │ ├── it sets the greeting string
│ │ └── it emit GreetingSet
│ └── when passing an empty greeting string
│ └── it reverts
└── when called by a non-owner
└── it reverts
└── it reverts

0 comments on commit cf9a4d3

Please sign in to comment.