Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: 2
updates:
# Go modules
- package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "monthly"
groups:
go-dependencies:
patterns:
- "*"

# GitHub Actions used in workflows
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "monthly"
groups:
github-actions:
patterns:
- "*"
28 changes: 28 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
### Related Issues

- fixes #issue-number

### Proposed Changes:

<!--- In case of a bug: Describe what caused the issue and how you solved it -->
<!--- In case of a feature: Describe what did you add and how it works -->

### How did you test it?

<!-- unit tests, integration tests, manual verification, instructions for manual tests -->

### Notes for the reviewer

<!-- E.g. point out a section where the reviewer should focus. -->

### Checklist

- [ ] Code is formatted (`make fmt-check`)
- [ ] Linting passes, incl. gosec and misspell (`make lint`)
- [ ] Static analysis passes (`make vet`)
- [ ] No new dependency vulnerabilities (`make vuln`)
- [ ] Tests pass, and I added/updated tests for my changes (`make test`)
- [ ] The full quality gate passes locally (`make verify`)
- [ ] I have updated the related issue with new insights and changes
- [ ] I documented exported identifiers with godoc comments
- [ ] I've used one of the [conventional commit types](https://www.conventionalcommits.org/en/v1.0.0/) for my PR title: `fix:`, `feat:`, `build:`, `chore:`, `ci:`, `docs:`, `style:`, `refactor:`, `perf:`, `test:`.
89 changes: 89 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: CI

on:
pull_request:
branches:
- master
push:
branches:
- master

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
verify:
name: Verify
runs-on: ubuntu-latest

services:
mysql:
image: mysql:8.4
env:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: ethblocks_test
MYSQL_USER: ethblocks_test
MYSQL_PASSWORD: ethblocks_test
ports:
- 3306:3306
options: >-
--health-cmd="mysqladmin ping -h 127.0.0.1 -uroot -proot"
--health-interval=10s
--health-timeout=5s
--health-retries=10

env:
ETHBLOCKS_DB: mysql
ETHBLOCKS_DBPASSROOT: root
ETHBLOCKS_DBUSER_TEST: ethblocks_test
ETHBLOCKS_DBPASS_TEST: ethblocks_test
ETHBLOCKS_DBHOST: 127.0.0.1
ETHBLOCKS_DBPORT: 3306
ETHBLOCKS_DBNAME_TEST: ethblocks_test
ETHBLOCKS_CLIENT: https://ethereum-rpc.publicnode.com
GOLANGCI_LINT_VERSION: v2.12.2

steps:
- name: Check out repository
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version-file: go.mod
cache: true

- name: Verify modules
run: make mod-verify

- name: Check formatting
run: make fmt-check

- name: Lint
run: make lint

- name: Vet
run: make vet

- name: Vulnerability scan
run: make vuln

- name: Test
run: make test

- name: Build
run: make build

- name: Upload coverage artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: coverage
path: coverage.out
if-no-files-found: ignore
Loading
Loading