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

ci: setup bulloak in CI #76

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all 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
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
Loading