update go mod: #59
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
# .github/workflows/tests.yml | |
name: Tests | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.22.0 | |
- name: Check out code | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Solidity compiler | |
run: | | |
mkdir -p ~/.solc/releases | |
wget -O solc-static-linux https://github.com/ethereum/solidity/releases/download/v0.8.4/solc-static-linux | |
chmod +x solc-static-linux | |
mv solc-static-linux ~/.solc/releases/solc-v0.8.4 | |
ln -s ~/.solc/releases/solc-v0.8.4 ~/.solc/solc | |
~/.solc/solc --version | |
- name: Get dependencies | |
run: go get -v -t -d ./... | |
- name: Update Git Submodules | |
run: git submodule update --init --recursive | |
- name: Run tests | |
run: go test -v ./optimizer/... | |
- name: Run benchmarks | |
run: go test -bench=. -benchmem ./... | |
- name: Check test coverage | |
run: | | |
go test -coverprofile=coverage.out ./... | |
go tool cover -func=coverage.out |