-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Add CI configuration for Solidity
- Loading branch information
Showing
2 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Solidity | ||
|
||
on: | ||
merge_group: | ||
push: | ||
branches: | ||
- "main" | ||
pull_request: | ||
types: [ opened, synchronize, reopened, ready_for_review ] | ||
|
||
jobs: | ||
jobs: | ||
unit-tests: | ||
name: Unit Tests | ||
runs-on: buildjet-16vcpu-ubuntu-2204 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
|
||
- name: Install Foundry | ||
uses: foundry-rs/foundry-toolchain@v1 | ||
with: | ||
version: nightly | ||
|
||
- name: Check formatting | ||
run: | | ||
forge fmt --check | ||
working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ | ||
|
||
- name: Run Forge build | ||
run: | | ||
forge --version | ||
forge build | ||
working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ | ||
|
||
- name: Run Forge tests | ||
run: | | ||
forge test | ||
working-directory: ${{ github.workspace }}/aptos/solidity/contracts/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -53,3 +53,8 @@ And you can re-run Solidity tests with newer fixture: | |
``` | ||
% cd solidity/contracts && forge test | ||
``` | ||
|
||
P.S.: You might be encountering issue with updating `sphinx-contracts` Foundry dependency, in this case try manually specifying accessing the submodule via SSH | ||
``` | ||
git config submodule.aptos/solidity/contracts/lib/sphinx-contracts.url [email protected]:lurk-lab/sphinx-contracts | ||
``` |