-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: fix and run all CI test properly (#72)
* remove the test skip for the wasm integration tests * add unit test pipeline and improve the integration test pipeline * add workflow for unit tests * trigger integration CI * fix the integration path * fix workflow work dir * add dynamic test run for all apps * fix test output * fix ci lint command * use lint from tools * downalod golangci-ling * fix stratergy diffs * fix app path for CI * use RELATIVE for diff check * fix relative path var * fix relative path var * fix lint matrix * fix wasm unit tests * fix lint pipeline * fix lint and unit filters for ci * download lint by curl * remove invalid case * rollbak lint * skip wasm test until the new version * remove unused concunrrency * fix tests concunrrency * remove duplicated serve chain and unused parametes * remove unused random app name * fix some lint issues * fix the test chain id * rollback config * use ignite errors pkg * rollback plush files * run mod tidy * fix makefile command to run unit tests without the integration * fix name of the CI tests * increase the cancel deadline time for health monitor integration tests * use global consts for flag names and fix health monitor loop * add close after flag for the health monitor app * fix the test assert for the health monitor integration tests * improve CI names * fix lint issue * fix makefile log * fix lint into the makefile * add github labels file * fix makefile * format .github/workflows/labeler.yml * rollback template changes * add ISSUE_TEMPLATE * app request template * add name of the app to issue template --------- Co-authored-by: Pantani <Pantani>
- Loading branch information
Showing
60 changed files
with
656 additions
and
324 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
name: Ignite Apps feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: request | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Is your App request related to a problem or issue you encountered? Please describe.** | ||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] | ||
|
||
**Describe the solution you'd like** | ||
A clear and concise description of what you want to happen. | ||
|
||
**Describe alternatives you've considered** | ||
A clear and concise description of any alternative solutions you've considered. | ||
|
||
Include other useful information that helps us understand your request. |
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,20 @@ | ||
--- | ||
name: Ignite Apps bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: bug | ||
assignees: '' | ||
--- | ||
|
||
**App**: Name of the app | ||
|
||
**Describe the bug** | ||
Tell us what you were doing and provide a clear and concise description of issue you encountered. | ||
|
||
**To reproduce** | ||
Steps to reproduce the behavior: | ||
1. | ||
|
||
**What version are you using?** | ||
|
||
Provide the output of the `ignite version` command. |
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,35 @@ | ||
"component:ci": | ||
- "!.github/labeler.yml" | ||
- "!.github/labels.json" | ||
- .github/**/* | ||
|
||
"component:docs": | ||
- README.md | ||
|
||
"component:consumer": | ||
- consumer/**/* | ||
|
||
"component:examples": | ||
- examples/**/* | ||
|
||
"component:explorer": | ||
- explorer/**/* | ||
|
||
"type:hermes": | ||
- hermes/**/* | ||
|
||
"component:marketplace": | ||
- marketplace/**/* | ||
|
||
"type:wasm": | ||
- wasm/**/* | ||
|
||
"component:configs": | ||
- .gitignore | ||
- .golangci.yml | ||
- app.ignite.yml | ||
- CODE_OF_CONDUCT.md | ||
- CONTRIBUTING.md | ||
- go.work.example | ||
- LICENSE | ||
- Makefile |
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,72 @@ | ||
[ | ||
{ | ||
"name": "bug", | ||
"color": "d73a4a", | ||
"description": "Something isn't working" | ||
}, | ||
{ | ||
"name": "bug fix", | ||
"color": "8a1d1c", | ||
"description": "Functionality that fixes a bug" | ||
}, | ||
{ | ||
"name": "dependencies", | ||
"color": "5319e7", | ||
"description": "Update to the dependencies" | ||
}, | ||
{ | ||
"name": "docs", | ||
"color": "0075ca", | ||
"description": "Improvements or additions to documentation" | ||
}, | ||
{ | ||
"name": "duplicate", | ||
"color": "cfd3d7", | ||
"description": "This issue or pull request already exists" | ||
}, | ||
{ | ||
"name": "good first issue", | ||
"color": "7057ff", | ||
"description": "Good for newcomers" | ||
}, | ||
{ | ||
"name": "help wanted", | ||
"color": "008672", | ||
"description": "Extra attention is needed" | ||
}, | ||
{ | ||
"name": "breaking change", | ||
"color": "a7327e", | ||
"description": "Functionality that contains breaking changes" | ||
}, | ||
{ | ||
"name": "don't merge", | ||
"color": "b60205", | ||
"description": "Please don't merge this functionality temporarily" | ||
}, | ||
{ | ||
"name": "feature", | ||
"color": "ffb703", | ||
"description": "New update to Gno" | ||
}, | ||
{ | ||
"name": "hotfix", | ||
"color": "003049", | ||
"description": "Major bug fix that should be merged ASAP" | ||
}, | ||
{ | ||
"name": "info needed", | ||
"color": "54eba0", | ||
"description": "More information needed" | ||
}, | ||
{ | ||
"name": "question", | ||
"color": "fbca04", | ||
"description": "Questions about Gno" | ||
}, | ||
{ | ||
"name": "investigating", | ||
"color": "8c008c", | ||
"description": "This behavior is still being tested out" | ||
} | ||
] |
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,16 @@ | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v4 |
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 |
---|---|---|
@@ -1,6 +1,11 @@ | ||
name: Integration | ||
on: | ||
pull_request: | ||
paths: | ||
- '**.go' | ||
- '**/go.mod' | ||
- '**/go.sum' | ||
- '**/testdata/**' | ||
push: | ||
paths: | ||
- '**.go' | ||
|
@@ -20,13 +25,14 @@ jobs: | |
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Finding files and store to output | ||
id: set-matrix | ||
run: echo "matrix=$(find . -type d -name "integration" -exec dirname {} \; | sort -u | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT | ||
run: echo "matrix=$(find . -type d -name "integration" -exec sh -c 'dirname "{}" | cut -c 3-' \; | sort -u | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT | ||
|
||
integration: | ||
name: test ${{ matrix.test-path }} | ||
name: ${{ matrix.test-path }} | ||
runs-on: ubuntu-latest | ||
needs: pre-test | ||
if: fromJSON(needs.pre-test.outputs.matrix)[0] != null | ||
|
@@ -35,17 +41,22 @@ jobs: | |
fail-fast: true | ||
matrix: | ||
test-path: ${{fromJson(needs.pre-test.outputs.matrix)}} | ||
|
||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: technote-space/[email protected] | ||
with: | ||
RELATIVE: ${{ matrix.test-path }} | ||
PATTERNS: | | ||
${{ matrix.test-path }}/**/*.go | ||
${{ matrix.test-path }}/*/go.mod | ||
${{ matrix.test-path }}/*/go.sum | ||
!${{ matrix.test-path }}/README.md | ||
**/*.go | ||
**/*.plush | ||
**/*.tpl | ||
go.mod | ||
go.sum | ||
**/testdata/** | ||
- uses: actions/setup-go@v4 | ||
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: 'stable' | ||
|
@@ -55,7 +66,8 @@ jobs: | |
env: | ||
GOTOOLCHAIN: local+path | ||
GOSUMDB: off | ||
run: go test -v -timeout 120m ${{ matrix.test-path }}/integration/... | ||
run: go test -race -failfast -v -timeout 120m ./integration/... | ||
working-directory: ${{ matrix.test-path }} | ||
|
||
status: | ||
runs-on: ubuntu-latest | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Lint | ||
name: Static Analysis | ||
on: | ||
pull_request: | ||
push: | ||
|
@@ -13,20 +13,23 @@ concurrency: | |
|
||
jobs: | ||
lint: | ||
name: 'Lint Go Code' | ||
name: "govet | govulncheck | lint" | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: technote-space/[email protected] | ||
with: | ||
PATTERNS: | | ||
**/*.go | ||
*/go.mod | ||
*/go.sum | ||
- uses: actions/setup-go@v4 | ||
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Run Lint Tests | ||
if: env.GIT_DIFF | ||
env: | ||
|
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,64 @@ | ||
name: Test Unit | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
push: | ||
paths-ignore: | ||
- '**.md' | ||
branches: | ||
- main | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
pre-test: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Finding files and store to output | ||
id: set-matrix | ||
run: echo "matrix=$(find . -type f -name "go.mod" -exec sh -c 'dirname "{}" | cut -c 3-' \; | sort -u | jq -R . | jq -cs .)" >> $GITHUB_OUTPUT | ||
|
||
unit: | ||
name: ${{ matrix.test-path }} | ||
runs-on: ubuntu-latest | ||
needs: pre-test | ||
if: fromJSON(needs.pre-test.outputs.matrix)[0] != null | ||
continue-on-error: false | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
test-path: ${{fromJson(needs.pre-test.outputs.matrix)}} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: technote-space/[email protected] | ||
with: | ||
RELATIVE: ${{ matrix.test-path }} | ||
PATTERNS: | | ||
**/*.go | ||
**/*.plush | ||
**/*.tpl | ||
go.mod | ||
go.sum | ||
**/testdata/** | ||
- uses: actions/setup-go@v5 | ||
if: env.GIT_DIFF | ||
with: | ||
go-version: '1.21' | ||
|
||
- name: Run Unit Tests | ||
if: env.GIT_DIFF | ||
env: | ||
GOTOOLCHAIN: local+path | ||
GOSUMDB: off | ||
run: go test -race -failfast -v -timeout 120m $(go list ./... | grep -v integration) | ||
working-directory: ${{ matrix.test-path }} |
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,3 +5,4 @@ | |
*.ign | ||
go.work | ||
go.work.sum | ||
bin/* |
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.