-
Notifications
You must be signed in to change notification settings - Fork 0
feat: initial import #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
b6eab4f
chore: add Makefile and linters configuration
tzdybal e048b76
feat: initial stub of BasedSequencer
tzdybal 5b9693c
ci: add workflows for testing, linting, housekeeping, and updates
tzdybal 0ddd32d
docs: fix makrdownlint issues
tzdybal e8bbd5d
docs: add comments
tzdybal 5b2c12e
ci: disable hadolint, as there is no Dockerfile
tzdybal f53c6dd
ci: add semantic release action
tzdybal a30e4b9
ci: fix docker path for dependabot
tzdybal 6a422c4
ci: simplify tag regexp in GH actions
tzdybal File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| reviewers: | ||
| defaults: | ||
| - rollkit | ||
| groups: | ||
| rollkit: | ||
| - team:core | ||
| files: | ||
| ".github/**": | ||
| - MSevey | ||
| - rollkit | ||
| options: | ||
| ignore_draft: true | ||
| ignored_keywords: | ||
| - WIP | ||
| number_of_reviewers: 3 |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| version: 2 | ||
| updates: | ||
| - package-ecosystem: github-actions | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - T:dependencies | ||
| # Group all patch updates into a single PR | ||
| groups: | ||
| patch-updates: | ||
| applies-to: version-updates | ||
| update-types: | ||
| - "patch" | ||
| - package-ecosystem: gomod | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - T:dependencies | ||
| # Group all patch updates into a single PR | ||
| groups: | ||
| patch-updates: | ||
| applies-to: version-updates | ||
| update-types: | ||
| - "patch" | ||
| - package-ecosystem: docker | ||
| directory: "/" | ||
| schedule: | ||
| interval: daily | ||
| open-pull-requests-limit: 10 | ||
| labels: | ||
| - T:dependencies | ||
| # Group all patch updates into a single PR | ||
| groups: | ||
| patch-updates: | ||
| applies-to: version-updates | ||
| update-types: | ||
| - "patch" | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: CI and Release | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| # Trigger on version tags | ||
| tags: | ||
| - 'v*' | ||
| pull_request: | ||
| merge_group: | ||
| workflow_dispatch: | ||
| # Inputs the workflow accepts. | ||
| inputs: | ||
| version: | ||
| # Friendly description to be shown in the UI instead of 'name' | ||
| description: "Semver type of new version (major / minor / patch)" | ||
| # Input has to be provided for the workflow to run | ||
| required: true | ||
| type: choice | ||
| options: | ||
| - patch | ||
| - minor | ||
| - major | ||
|
|
||
| jobs: | ||
| lint: | ||
| uses: ./.github/workflows/lint.yml | ||
|
|
||
| test: | ||
| uses: ./.github/workflows/test.yml | ||
|
|
||
| # Make a release if this is a manually trigger job, i.e. workflow_dispatch | ||
| release: | ||
| needs: [lint, test] | ||
| runs-on: ubuntu-latest | ||
| if: ${{ github.event_name == 'workflow_dispatch' }} | ||
| permissions: "write-all" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Version Release | ||
| uses: rollkit/.github/.github/actions/[email protected] | ||
| with: | ||
| github-token: ${{secrets.GITHUB_TOKEN}} | ||
| version-bump: ${{inputs.version}} | ||
tzdybal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Housekeeping | ||
|
|
||
| on: | ||
| issues: | ||
| types: [opened] | ||
| pull_request_target: | ||
| types: [opened, ready_for_review] | ||
|
|
||
| jobs: | ||
| issue-management: | ||
| if: ${{ github.event.issue }} | ||
| name: Add issues to project and add triage label | ||
| uses: rollkit/.github/.github/workflows/[email protected] | ||
| secrets: inherit | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| with: | ||
| run-labels: true | ||
| labels-to-add: "needs-triage" | ||
| run-projects: true | ||
| project-url: https://github.com/orgs/rollkit/projects/7 | ||
|
|
||
| add-pr-to-project: | ||
| # ignore dependabot PRs | ||
| if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }} | ||
| name: Add PRs to project | ||
| uses: rollkit/.github/.github/workflows/[email protected] | ||
| secrets: inherit | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| with: | ||
| run-projects: true | ||
| project-url: https://github.com/orgs/rollkit/projects/7 | ||
|
|
||
| auto-add-reviewer: | ||
| name: Auto add reviewer to PR | ||
| if: github.event.pull_request | ||
| uses: rollkit/.github/.github/workflows/[email protected] | ||
| secrets: inherit | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| with: | ||
| run-auto-request-review: true | ||
|
|
||
| auto-add-assignee-pr: | ||
| # ignore dependabot PRs | ||
| if: ${{ github.event.pull_request && github.actor != 'dependabot[bot]' }} | ||
| name: Assign PR to creator | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Set pull_request url and creator login | ||
| # yamllint disable rule:line-length | ||
| run: | | ||
| echo "PR=${{ github.event.pull_request.html_url }}" >> $GITHUB_ENV | ||
| echo "CREATOR=${{ github.event.pull_request.user.login }}" >> $GITHUB_ENV | ||
| # yamllint enable rule:line-length | ||
| - name: Assign PR to creator | ||
| run: gh pr edit ${{ env.PR }} --add-assignee ${{ env.CREATOR }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tzdybal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| auto-add-assignee-label: | ||
| if: ${{ github.event.issue }} | ||
| name: Assign issue to creator | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| issues: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout the repository | ||
| uses: actions/checkout@v4 | ||
| - name: Set issue number and creator login | ||
| run: | | ||
| echo "ISSUE=${{ github.event.issue.number }}" >> $GITHUB_ENV | ||
| echo "CREATOR=${{ github.event.issue.user.login }}" >> $GITHUB_ENV | ||
| - name: Assign issue to creator | ||
| run: gh issue edit ${{ env.ISSUE }} --add-assignee ${{ env.CREATOR }} | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
tzdybal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,50 @@ | ||
| # lint runs all linters in this repository | ||
| # This workflow is triggered by ci_release.yml workflow | ||
| name: lint | ||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
| golangci-lint: | ||
| name: golangci-lint | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: ./go.mod | ||
| # This steps sets the GIT_DIFF environment variable to true | ||
| # if files defined in PATTERS changed | ||
| - uses: technote-space/[email protected] | ||
| with: | ||
| # This job will pass without running if go.mod, go.sum, and *.go | ||
| # wasn't modified. | ||
| PATTERNS: | | ||
| **/**.go | ||
| go.mod | ||
| go.sum | ||
| - uses: golangci/[email protected] | ||
| with: | ||
| version: latest | ||
| args: --timeout 10m | ||
| github-token: ${{ secrets.github_token }} | ||
| if: env.GIT_DIFF | ||
|
|
||
| # hadolint lints the Dockerfile | ||
MSevey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| # hadolint: | ||
| # uses: rollkit/.github/.github/workflows/[email protected] # yamllint disable-line rule:line-length | ||
| # with: | ||
| # dockerfile: Dockerfile | ||
| # failure-threshold: error | ||
|
|
||
| yamllint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: rollkit/.github/.github/actions/[email protected] | ||
|
|
||
| markdown-lint: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: rollkit/.github/.github/actions/[email protected] | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| name: Semantic Pull Request | ||
|
|
||
| on: | ||
| pull_request_target: | ||
| types: | ||
| - opened | ||
| - edited | ||
| - synchronize | ||
|
|
||
| permissions: | ||
| pull-requests: read | ||
|
|
||
| jobs: | ||
| main: | ||
| name: conventional-commit-pr-title | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: amannn/action-semantic-pull-request@v5 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,24 @@ | ||
| name: Semantic Release | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
|
|
||
| jobs: | ||
| release: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - name: Configure Semantic Release | ||
| # Work around for non npm project | ||
| # REF: https://github.com/cycjimmy/semantic-release-action/issues/115#issuecomment-1817264419 | ||
| run: echo '{"branches":[],"plugins":["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/github"]}' > .releaserc.json | ||
| - name: Create Release | ||
| uses: cycjimmy/semantic-release-action@v4 | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| with: | ||
| branches: | | ||
| ["main"] | ||
MSevey marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| # Tests / Code Coverage workflow | ||
| # This workflow is triggered by ci_release.yml workflow | ||
| name: Tests / Code Coverage | ||
| on: | ||
| workflow_call: | ||
|
|
||
| jobs: | ||
tzdybal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| go_mod_tidy_check: | ||
| name: Go Mod Tidy Check | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: ./go.mod | ||
| - run: go mod tidy | ||
| - name: check for diff | ||
| run: git diff --exit-code | ||
|
|
||
| unit_test: | ||
| name: Run Unit Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: set up go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: ./go.mod | ||
| - name: Run unit test | ||
| run: make test | ||
| - name: upload coverage report | ||
| uses: codecov/[email protected] | ||
| with: | ||
| token: ${{ secrets.CODECOV_TOKEN }} | ||
| file: ./coverage.txt | ||
|
|
||
| integration_test: | ||
| name: Run Integration Tests | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: set up go | ||
| uses: actions/setup-go@v5 | ||
| with: | ||
| go-version-file: ./go.mod | ||
| - name: Integration Tests | ||
| run: echo "No integration tests yet" | ||
tzdybal marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| run: | ||
| timeout: 5m | ||
| modules-download-mode: readonly | ||
|
|
||
| linters: | ||
| enable: | ||
| - errorlint | ||
| - errcheck | ||
| - gofmt | ||
| - goimports | ||
| - gosec | ||
| - gosimple | ||
| - govet | ||
| - ineffassign | ||
| - misspell | ||
| - revive | ||
| - staticcheck | ||
| - typecheck | ||
| - unconvert | ||
| - unused | ||
|
|
||
| issues: | ||
| exclude-use-default: false | ||
| # mempool and indexer code is borrowed from Tendermint | ||
| exclude-dirs: | ||
| - mempool | ||
| - state/indexer | ||
| - state/txindex | ||
| - third_party | ||
| include: | ||
| - EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments | ||
| - EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments | ||
|
|
||
| linters-settings: | ||
| gosec: | ||
| excludes: | ||
| - G115 | ||
| revive: | ||
| rules: | ||
| - name: package-comments | ||
| disabled: true | ||
| - name: duplicated-imports | ||
| severity: warning | ||
| - name: exported | ||
| arguments: | ||
| - disableStutteringCheck | ||
|
|
||
| goimports: | ||
| local-prefixes: github.com/rollkit |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| default: true | ||
| MD010: | ||
| code_blocks: false | ||
| MD013: false | ||
| MD024: | ||
| allow_different_nesting: true |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.