-
Notifications
You must be signed in to change notification settings - Fork 972
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into chore/ramin/rename-cmd-parse-client
- Loading branch information
Showing
106 changed files
with
1,632 additions
and
1,213 deletions.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<!-- | ||
Thank you for submitting a pull request! | ||
Please make sure you have reviewed our contributors guide before submitting your | ||
first PR. | ||
Please ensure you've addressed or included references to any related issues. | ||
Tips: | ||
- Use keywords like "closes" or "fixes" followed by an issue number to automatically close related issues when the PR is merged (e.g., "closes #123" or "fixes #123"). | ||
- Describe the changes made in the PR. | ||
- Ensure the PR has one of the required tags (kind:fix, kind:misc, kind:break!, kind:refactor, kind:feat, kind:deps, kind:docs, kind:ci, kind:chore, kind:testing) | ||
--> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,6 @@ on: | |
- "v*" | ||
pull_request: | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
version: | ||
# Friendly description to be shown in the UI instead of 'name' | ||
|
@@ -23,32 +22,56 @@ on: | |
- major | ||
|
||
jobs: | ||
# set up go version for use through pipelines, setting | ||
# variable one time and setting outputs to access passing it | ||
# to other jobs | ||
setup: | ||
runs-on: ubuntu-latest | ||
env: | ||
# upgrade go version throughout pipeline here | ||
GO_VERSION: "1.21" | ||
outputs: | ||
go-version: ${{ steps.set-vars.outputs.go-version }} | ||
branch: ${{ steps.trim_ref.outputs.branch }} | ||
steps: | ||
- name: Set go version | ||
id: set-vars | ||
run: echo "go-version=${{env.GO_VERSION}}" >> "$GITHUB_OUTPUT" | ||
|
||
- name: Trim branch name | ||
id: trim_ref | ||
run: | | ||
echo "branch=$(${${{ github.ref }}:11})" >> $GITHUB_OUTPUT | ||
# Dockerfile Linting | ||
hadolint: | ||
uses: celestiaorg/.github/.github/workflows/[email protected].3 # yamllint disable-line rule:line-length | ||
uses: celestiaorg/.github/.github/workflows/[email protected].8 # yamllint disable-line rule:line-length | ||
with: | ||
dockerfile: Dockerfile | ||
|
||
yamllint: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: celestiaorg/.github/.github/actions/[email protected].3 | ||
- uses: celestiaorg/.github/.github/actions/[email protected].8 | ||
|
||
markdown-lint: | ||
name: Markdown Lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v3 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18 | ||
- run: | | ||
npm install -g [email protected] | ||
markdownlint --config .markdownlint.yaml '**/*.md' | ||
go-ci: | ||
needs: setup | ||
uses: ./.github/workflows/go-ci.yml | ||
with: | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
|
||
# If this was a workflow dispatch event, we need to generate and push a tag | ||
# for goreleaser to grab | ||
|
@@ -58,6 +81,7 @@ jobs: | |
permissions: "write-all" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Bump version and push tag | ||
# Placing the if condition here is a workaround for needing to block | ||
# on this step during workflow dispatch events but the step not | ||
|
@@ -66,12 +90,10 @@ jobs: | |
# in goreleaser not running either. | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: mathieudutour/[email protected] | ||
|
||
- name: Version Release | ||
uses: celestiaorg/.github/.github/actions/[email protected] | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
default_bump: ${{ inputs.version }} | ||
release_branches: ${{ needs.setup.outputs.branch }} | ||
|
||
# Generate the release with goreleaser to include pre-built binaries | ||
goreleaser: | ||
|
@@ -83,10 +105,20 @@ jobs: | |
permissions: "write-all" | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- run: git fetch --force --tags | ||
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.21 | ||
go-version: ${{ needs.setup.outputs.go-version }} | ||
|
||
- name: Import GPG key | ||
id: import_gpg | ||
uses: crazy-max/ghaction-import-gpg@v4 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_SIGNING_KEY }} | ||
passphrase: ${{ secrets.GPG_PASSPHRASE }} | ||
|
||
# Generate the binaries and release | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
|
@@ -95,6 +127,7 @@ jobs: | |
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }} | ||
|
||
# TODO: permission issue, but not worth fixing as this should be refactored | ||
# into the celestiaorg/.github repo, at which point any permission issues will | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ on: | |
merge_group: | ||
push: | ||
branches: | ||
- "**" | ||
- "main" | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+" | ||
- "v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+" | ||
|
@@ -18,6 +18,6 @@ jobs: | |
permissions: | ||
contents: write | ||
packages: write | ||
uses: celestiaorg/.github/.github/workflows/[email protected].3 # yamllint disable-line rule:line-length | ||
uses: celestiaorg/.github/.github/workflows/[email protected].8 # yamllint disable-line rule:line-length | ||
with: | ||
dockerfile: Dockerfile |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,11 @@ name: Go CI | |
|
||
on: | ||
workflow_call: | ||
|
||
env: | ||
GO_VERSION: '1.21' | ||
inputs: | ||
go-version: | ||
description: 'Go version' | ||
required: true | ||
type: string | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
|
@@ -20,12 +22,14 @@ jobs: | |
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: golangci-lint | ||
uses: golangci/[email protected] | ||
with: | ||
version: v1.54.2 | ||
version: v1.55 | ||
skip-pkg-cache: true | ||
skip-build-cache: true | ||
|
||
go_mod_tidy_check: | ||
name: Go Mod Tidy Check | ||
|
@@ -36,35 +40,44 @@ jobs: | |
|
||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- run: go mod tidy | ||
|
||
- name: check for diff | ||
run: git diff --exit-code | ||
|
||
test_coverage: | ||
needs: [lint, go_mod_tidy_check] | ||
name: Unit Tests Coverage | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
OS: ${{ matrix.os }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: set up go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: run unit tests | ||
run: make test-unit | ||
|
||
- name: upload coverage | ||
uses: codecov/[email protected] | ||
with: | ||
env_vars: OS | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
file: ./coverage.txt | ||
name: coverage-${{ matrix.os }} | ||
|
||
unit_race_test: | ||
needs: [lint, go_mod_tidy_check] | ||
name: Run Unit Tests with Race Detector | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -74,12 +87,14 @@ jobs: | |
- name: set up go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: execute test run | ||
run: make test-unit-race | ||
continue-on-error: true | ||
|
||
integration_test: | ||
needs: [lint, go_mod_tidy_check] | ||
name: Run Integration Tests | ||
runs-on: ubuntu-latest | ||
|
||
|
@@ -89,10 +104,12 @@ jobs: | |
- name: set up go | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
go-version: ${{ inputs.go-version }} | ||
|
||
- name: Swamp Tests | ||
run: make test-swamp | ||
continue-on-error: true | ||
|
||
- name: Swamp Tests with Race Detector | ||
run: make test-swamp-race | ||
continue-on-error: true |
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
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
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
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
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
Oops, something went wrong.