Skip to content

Commit

Permalink
style: separate tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dristpunk committed Nov 28, 2023
1 parent 111885a commit e33b7a7
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 7 deletions.
26 changes: 20 additions & 6 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ concurrency:
cancel-in-progress: true

jobs:
tests:
name: Run Unit and E2E Tests
unit-tests:
name: Run Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -39,7 +39,13 @@ jobs:
- name: Run tests
shell: bash
run: yarn test
run: yarn test:unit

integration-tests:
name: Run Integration Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
Expand All @@ -55,11 +61,19 @@ jobs:
- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1

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

- name: Create env file
run: |
touch .env
echo MAINNET_RPC="${{ secrets.MAINNET_RPC }}" >> .env
echo GOERLI_RPC="${{ secrets.GOERLI_RPC }}" >> .env
cat .env
- name: Run tests
run: yarn test:unit
run: yarn test:integration

lint:
name: Lint Commit Messages
runs-on: ubuntu-latest
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"lint:sol-tests": "solhint 'solidity/test/**/*.sol'",
"prepare": "husky install",
"test": "forge test -vvv",
"test:e2e": "forge test --match-contract E2E -vvv",
"test:integration": "forge test --match-contract Integration -vvv",
"test:unit": "forge test --match-contract Unit -vvv",
"test:unit:deep": "FOUNDRY_FUZZ_RUNS=5000 yarn test:unit"
},
Expand Down

0 comments on commit e33b7a7

Please sign in to comment.