Skip to content

Commit

Permalink
feat: Add CI configuration for Solidity
Browse files Browse the repository at this point in the history
  • Loading branch information
storojs72 committed Jun 21, 2024
1 parent 0938676 commit 731e469
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/solidity.yml
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/
5 changes: 5 additions & 0 deletions aptos/solidity/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
```

0 comments on commit 731e469

Please sign in to comment.