Skip to content
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

feat: add github action #229

Merged
merged 19 commits into from
Oct 1, 2024
Merged
120 changes: 83 additions & 37 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ commands:
fi

jobs:
build:
build-debug:
executor: golang
working_directory: ~/curio
steps:
Expand All @@ -109,20 +109,52 @@ jobs:
- install-ubuntu-deps
- check-go-version
- run: make deps debug
- run: make 2k
- run: make calibnet
- run: make build
- persist_to_workspace:
root: ~/
paths:
- "curio"
build-2k:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- check-go-version
- run: make deps 2k
build-mainnet:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- check-go-version
- run: make deps build
build-calibnet:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- check-go-version
- run: make deps calibnet
mod-tidy-check:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- install-ubuntu-deps
- attach_workspace:
at: ~/
- run: git submodule sync
- run: git submodule update --init
- run: go mod tidy -v
- run:
name: Check git diff
Expand Down Expand Up @@ -166,12 +198,17 @@ jobs:
name: yugabyte
resource_class: << parameters.resource_class >>
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- attach_workspace:
at: ~/
- run: make deps

- when:
condition: << parameters.get-params >>
steps:
- run: make debug
- download-params
- run:
name: go test
Expand Down Expand Up @@ -210,9 +247,12 @@ jobs:
- image: cimg/go:1.21
resource_class: medium+
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- attach_workspace:
at: ~/
- run: make deps
- run:
name: Lint
command: |
Expand All @@ -224,61 +264,67 @@ jobs:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- run:
command: "! go fmt ./... 2>&1 | read"

gen-check:
executor: golang-2xl
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- attach_workspace:
at: ~/
- run: go install golang.org/x/tools/cmd/goimports
- run: make gen
- run: make deps gen
- run: git --no-pager diff && git --no-pager diff --quiet

forest-check:
executor: golang
working_directory: ~/curio
steps:
- checkout
- git_fetch_all_tags
- run: git submodule sync
- run: git submodule update --init
- install-ubuntu-deps
- attach_workspace:
at: ~/
- run: make forest-test

workflows:
ci:
jobs:
- build
- lint-all:
requires:
- build
- mod-tidy-check:
requires:
- build
- gofmt:
requires:
- build
- gen-check:
requires:
- build
- forest-check:
requires:
- build
- build-debug
- build-2k
- build-mainnet
- build-calibnet
- lint-all
- mod-tidy-check
- gofmt
- gen-check
- forest-check
- test:
name: test-itest-curio
requires:
- build
suite: itest-curio
suite: test-itest-curio
target: "./itests/curio_test.go"
get-params: true
resource_class: 2xlarge
- test:
name: test-all
requires:
- build
suite: test-all
target: "`go list ./... | grep -v curio/itests`"
get-params: true
resource_class: 2xlarge
- test:
name: test-itest-harmonyDB
suite: test-itest-harmonyDB
target: "./itests/harmonydb_test.go"
resource_class: 2xlarge
- test:
name: test-itest-alertnow
suite: test-itest-alertnow
target: "./itests/alertnow_test.go"
resource_class: 2xlarge
83 changes: 83 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: "Bug Report"
description: "File a bug report to help us improve"
labels: [need/triage, kind/bug]
body:
- type: checkboxes
attributes:
label: Checklist
description: Please check off the following boxes before continuing to file a bug report!
options:
- label: This is **not** a question or a support request. If you have any Curio related questions, please ask in the [discussion forum](https://github.com/filecoin-project/curio/discussions).
required: true
- label: This is **not** a new feature request. If it is, please file a [feature request](https://github.com/filecoin-project/curio/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Ffeature&template=feature_request.yml) instead.
required: true
- label: This is **not** an enhancement request. If it is, please file a [improvement suggestion](https://github.com/filecoin-project/curio/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Fenhancement&template=enhancement.yml) instead.
required: true
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/curio/issues) and the [discussion forum](https://github.com/filecoin-project/curio/discussions), and there is no existing related issue or discussion.
required: true
- label: I am running the [`Latest release`](https://github.com/filecoin-project/curio/releases), or the most recent RC(release candidate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
required: true
- label: I did not make any code changes to curio.
required: false
- type: checkboxes
attributes:
label: Curio component
description: Please select the Curio component you are filing a bug for
options:
- label: PoRep Pipeline
required: false
- label: Snap Deals
required: false
- label: Market
required: false
- label: IPNI provider
required: false
- label: Curio UI
required: false
- label: Other
required: false
- type: textarea
id: version
attributes:
label: Curio Version
render: text
description: Enter the output of `curio --version`.
placeholder: |
e.g.
curio version 1.23.1+mainnet+git_038c7c3_2024-09-30T14:27:56+04:00
validations:
required: true
- type: textarea
id: Description
attributes:
label: Describe the Bug
description: |
This is where you get to tell us what went wrong, when doing so, please try to provide a clear and concise description of the bug with all related information:
* What you were doding when you experienced the bug?
* Any *error* messages you saw, *where* you saw them, and what you believe may have caused them (if you have any ideas).
* What is the expected behaviour?
validations:
required: true
- type: textarea
id: extraInfo
attributes:
label: Logging Information
render: text
description: |
Please provide debug logs of the problem, remember you can get set log level control for:
* use `curio cli log list` to get all log systems available and set level by `curio cli log set-level`.
validations:
required: true
- type: textarea
id: RepoSteps
attributes:
label: Repo Steps
description: "Steps to reproduce the behavior"
value: |
1. Run '...'
2. Do '...'
3. See error '...'
...
validations:
required: false

42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/enhancement_report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "Enhancement Report"
description: "Suggest an improvement to an existing Curio feature"
labels: [need/triage, kind/enhancement]
body:
- type: checkboxes
attributes:
label: Checklist
description: Please check off the following boxes before continuing to continuing to create an improvement suggestion!
options:
- label: This is **not** a question or a support request. If you have any Curio related questions, please ask in the [discussion forum](https://github.com/filecoin-project/curio/discussions).
required: true
- label: This is **not** a new feature request. If it is, please file a [feature request](https://github.com/filecoin-project/curio/issues/new?assignees=&labels=need%2Ftriage%2Ckind%2Ffeature&template=feature_request.yml) instead.
required: true
- label: I **have** searched on the [issue tracker](https://github.com/filecoin-project/curio/issues) and the [discussion forum](https://github.com/filecoin-project/curio/discussions), and there is no existing related issue or discussion.
required: true
- label: I am running the [`Latest release`](https://github.com/filecoin-project/curio/releases), or the most recent RC(release candidate) for the upcoming release or the dev branch(master), or have an issue updating to any of these.
required: true
- type: checkboxes
attributes:
label: Curio component
description: Please select the Curio component you are filing a bug for
options:
- label: PoRep Pipeline
required: false
- label: Snap Deals
required: false
- label: Market
required: false
- label: IPNI provider
required: false
- label: Curio UI
required: false
- label: Other
required: false
- type: textarea
id: request
attributes:
label: Improvement Suggestion
description: A clear and concise description of what the motivation or the current problem is and what is the suggested improvement?
placeholder: Ex. Currently Curio... However, as a storage provider or client, I'd like...
validations:
required: true
61 changes: 61 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Feature request
description: Suggest an idea for Curio
labels: [need/triage, kind/feature]
body:
- type: checkboxes
attributes:
label: Checklist
description: Please check off the following boxes before continuing to create a new feature request!
options:
- label: This is **not** a new feature or an enhancement to the Filecoin protocol. If it is, please open an [FIP issue](https://github.com/filecoin-project/FIPs/blob/master/FIPS/fip-0001.md).
required: true
- label: This is **not** brainstorming ideas. If you have an idea you'd like to discuss, please open a new discussion on [the Curio forum](https://github.com/filecoin-project/curio/discussions/categories/ideas) and select the category as `Ideas`.
required: true
- label: I **have** a specific, actionable, and well motivated feature request to propose.
required: true
- type: checkboxes
attributes:
label: Curio component
description: Please select the Curio component you are filing a bug for
options:
- label: PoRep Pipeline
required: false
- label: Snap Deals
required: false
- label: Market
required: false
- label: IPNI provider
required: false
- label: Curio UI
required: false
- label: Other
required: false
- type: textarea
id: request
attributes:
label: What is the motivation behind this feature request? Is your feature request related to a problem? Please describe.
description: A clear and concise description of what the motivation or the problem is.
placeholder: Ex. I'm always frustrated when [...]
validations:
required: true
- type: textarea
id: solution
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
validations:
required: true
- type: textarea
id: alternates
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: false
- type: textarea
id: extra
attributes:
label: Additional context
description: Add any other context, design docs or screenshots about the feature request here.
validations:
required: false
Loading