-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
2 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,50 @@ | ||
name: Test Deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test: | ||
name: Test Deployment | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.20' | ||
|
||
- name: Install Go dependencies | ||
run: go get . | ||
|
||
- name: Setup Solidity Compiler v0.8.20 | ||
run: | | ||
wget https://github.com/ethereum/solidity/releases/download/v0.8.20/solc-static-linux | ||
chmod +x solc-static-linux | ||
sudo mv solc-static-linux /usr/local/bin/solc | ||
- name: Remove panic contracts | ||
run: | | ||
rm contracts/USDC.sol | ||
rm contracts/WETH.sol | ||
- name: Setup environment variables | ||
run: | | ||
echo "PRIVATE_KEY=${{ secrets.PRIVATE_KEY }}" >> $GITHUB_ENV | ||
echo "CHAIN_ID=5" >> $GITHUB_ENV | ||
- name: Build Go Project | ||
run: go build main.go | ||
|
||
- name: Test Go Project with the Go CLI | ||
run: go test main.go | ||
|
||
- name: Run script and Deployment contracts | ||
run: | | ||
go run main.go | ||
env: | ||
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} | ||
CHAIN_ID: 5 |
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