Skip to content

Commit

Permalink
contracts/ci: Update testing CI script and README
Browse files Browse the repository at this point in the history
- We no longer need env variables to run tests. The deployment is now
  carried out by the default account. This is because we converted the
  production deployment script to use cast wallet instead of private keys
  passed through the .env

- The README was updated to include more info about deploying to local
  and production chains
  • Loading branch information
sayandcode committed Mar 29, 2024
1 parent 07ecbc2 commit d27d7b8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/test-contracts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ jobs:
id: build

- name: Run Forge tests
env:
FOUNDRY_ENV: ${{ secrets.FOUNDRY_ENV }}
run: |
echo $FOUNDRY_ENV > .env
forge test -vvv
id: test
17 changes: 17 additions & 0 deletions contracts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,21 @@ $ forge test

```shell
$ forge snapshot
```

### Deploy to Local Anvil (development) chain
First start the anvil chain on a separate shell session
```shell
/contracts$ anvil
```
Then deploy to it with the following command. It will use the default RPC used by anvil
```shell
# (Optional) sudo apt install make
/contracts$ make deploy-dev
```

### Deploy to Production Chain
```shell
# (Optional) sudo apt install make
/contracts$ make deploy-prod
```

0 comments on commit d27d7b8

Please sign in to comment.