Improve coverage more by purifying domain computation #59
This file contains hidden or 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
| name: Go generate & lint | |
| on: | |
| push: | |
| branches: [master, main] | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.8" | |
| - name: Run generate | |
| run: make generate | |
| - name: Fail if generate produced a diff | |
| run: | | |
| if [ -n "$(git status --porcelain)" ]; then | |
| echo "::error::make generate produced uncommitted changes. Run 'make generate' and commit the result." | |
| git status --porcelain | |
| git diff | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.8" | |
| - name: Run golangci-lint | |
| uses: golangci/golangci-lint-action@v9 | |
| with: | |
| version: v2.11.2 | |
| args: --timeout=5m | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.8" | |
| - name: Run tests with coverage | |
| run: make coverage | |
| - name: Upload coverage | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage | |
| path: coverage.out | |
| test-parity: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: "1.25.8" | |
| - name: Start web3signer (parity) | |
| working-directory: test/web3signer-parity | |
| run: | | |
| docker run -d \ | |
| --network host \ | |
| --name web3signer-parity \ | |
| -v "$PWD/key_config.yaml":/app/keys/key_config.yaml \ | |
| -v "$PWD/config.yaml":/app/config.yaml \ | |
| consensys/web3signer:develop \ | |
| --config-file /app/config.yaml \ | |
| eth2 | |
| - name: Wait until web3signer is healthy | |
| working-directory: test/web3signer-parity | |
| run: ./wait-until-healthy.sh | |
| - name: Run parity tests | |
| run: go test ./test/web3signer-parity/... | |
| - name: Dump web3signer logs | |
| if: always() | |
| run: docker logs web3signer-parity || true | |
| - name: Stop web3signer | |
| if: always() | |
| run: docker stop web3signer-parity || true |