Skip to content

Commit

Permalink
feat: initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
simon-something committed Oct 30, 2024
1 parent e5e7e1a commit c55fd49
Show file tree
Hide file tree
Showing 36 changed files with 762 additions and 3,093 deletions.
7 changes: 0 additions & 7 deletions .env.example

This file was deleted.

2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1 +1 @@
*.sol linguist-language=Solidity
*.sol linguist-language=Rust
59 changes: 0 additions & 59 deletions .github/workflows/canary.yml

This file was deleted.

73 changes: 0 additions & 73 deletions .github/workflows/coverage.yml

This file was deleted.

58 changes: 0 additions & 58 deletions .github/workflows/release.yml

This file was deleted.

147 changes: 21 additions & 126 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,148 +7,43 @@ concurrency:
cancel-in-progress: true

env:
MAINNET_RPC: ${{ secrets.MAINNET_RPC }}
SEPOLIA_RPC: ${{ secrets.SEPOLIA_RPC }}
CARGO_TERM_COLOR: always

jobs:
unit-tests:
name: Run Unit Tests
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

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

- name: Precompile using 0.8.14 and via-ir=false
run: yarn build

- name: Run tests
shell: bash
run: yarn test:unit

integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Fmt check
run: cargo fmt --check

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

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

- name: Precompile using 0.8.14 and via-ir=false
run: yarn build

- name: Run tests
run: yarn test:integration

echidna-tests:
name: Echidna Test
check:
name: Check
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

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

- name: Compile contracts
run: |
forge build --build-info
- name: Run Echidna
uses: crytic/echidna-action@v2
with:
files: .
contract: InvariantGreeter
test-mode: assertion
crytic-args: --ignore-compile
- uses: actions/checkout@v4
- name: Check
run: cargo check

halmos-tests:
name: Run symbolic execution tests
clippy:
name: Clippy
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Run clippy
run: cargo clippy --no-deps --all-targets

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

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

- name: Precompile with via-ir=false
run: yarn build

- name: Run tests
run: yarn test:integration

lint:
name: Lint Commit Messages
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: wagoid/commitlint-github-action@v5

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20.x
cache: 'yarn'

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

- run: yarn lint:check
- name: Build
run: cargo build
- name: Run tests
run: cargo test
Loading

0 comments on commit c55fd49

Please sign in to comment.