Skip to content

Add fee market monetization #39

Add fee market monetization

Add fee market monetization #39

name: Developer helper
on:
pull_request:
workflow_dispatch:
env:
# GENERATE_EXCEPTIONS are exceptions made to the 'go generate' command.
# These patterns are matched (negatively) against 'go list' output.
#
# - trezor: Ignore generating trezor package based on this comment:
# https://github.com/ethereum/go-ethereum/blob/master/accounts/usbwallet/trezor/trezor.go#L21-L43
GENERATE_EXCEPTIONS: |
trezor
jobs:
go-generate-check:
name: Check if "go generate" has been run
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
id: go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Check out code into the Go module directory
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install deps
id: install-deps
run: |
SOLC_BIN=solc-linux-amd64-v0.6.0+commit.26b70077
curl -OL https://binaries.soliditylang.org/linux-amd64/$SOLC_BIN
sudo mv $SOLC_BIN /usr/bin/solc
sudo chmod +x /usr/bin/solc
shell: bash
- name: Install devtools
id: install-devtools
run: make devtools
- name: Run go:generate
id: go-generate
run: |
list="$(go list ./...)"
for pattern in ${GENERATE_EXCEPTIONS[@]}; do
list="$(grep -v "$pattern" <<< "$list")"
done
go generate "$list"
- name: Check for modified files
id: git-check
run: |
if ! git diff-index --quiet HEAD --; then
echo "🔴 ERROR: There are modified files after running 'go generate'"
git status
exit 1
fi