Skip to content

Commit

Permalink
test: circleci enable (#20)
Browse files Browse the repository at this point in the history
* chore: circleci update

* chore: github setup

* chore: circleci

* fix: fix

* chore: circleci

* lint: lint

* chore: timeout for lint

* test: branches

* chore: go mod tidy

* test: order change
  • Loading branch information
kfangw authored and Sangyeop.lee committed Dec 8, 2020
1 parent 6d6459b commit 4f99083
Show file tree
Hide file tree
Showing 16 changed files with 145 additions and 567 deletions.
149 changes: 108 additions & 41 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,6 @@ commands:
make << parameters.target >>
jobs:
build-docs:
executor: docs
steps:
- checkout
- run:
name: "Build docs"
command: make build-docs
- run:
name: "Upload docs to S3"
command: make sync-docs

setup-dependencies:
executor: golang
steps:
Expand Down Expand Up @@ -69,59 +58,137 @@ jobs:
paths:
- ".git"

test-sim-nondeterminism:
executor: golang
steps:
- make:
target: test-sim-nondeterminism
description: "Test individual module simulations"

test-sim-import-export:
executor: golang
steps:
- make:
target: test-sim-import-export
description: "Test application import/export simulation"

test-sim-after-import:
executor: golang
steps:
- make:
target: test-sim-after-import
description: "Test simulation after import"

test-sim-multi-seed-long:
executor: golang
steps:
- make:
target: test-sim-multi-seed-long
description: "Test multi-seed simulation (long)"

test-sim-multi-seed-short:
executor: golang
steps:
- make:
target: test-sim-multi-seed-short
description: "Test multi-seed simulation (short)"

test-cover:
executor: golang
parallelism: 4
steps:
- checkout
- restore_cache:
keys:
- go-mod-v2-{{ checksum "go.sum" }}
- run:
name: Run tests
command: |
export VERSION="$(git describe --tags --long | sed 's/v\(.*\)/\1/')"
export GO111MODULE=on
mkdir -p /tmp/logs /tmp/workspace/profiles
for pkg in $(go list ./... | grep -v '/simulation' | circleci tests split); do
id=$(echo "$pkg" | sed 's|[/.]|_|g')
go test -mod=readonly -timeout 8m -race -coverprofile=/tmp/workspace/profiles/$id.out -covermode=atomic -tags='ledger test_ledger_mock' "$pkg" | tee "/tmp/logs/$id-$RANDOM.log"
done
- persist_to_workspace:
root: /tmp/workspace
paths:
- "profiles/*"
- store_artifacts:
path: /tmp/logs

update-swagger-docs:
executor: golang
steps:
- make:
target: update-swagger-docs
description: "Check if statik.go is up-to-date"
lint:
executor: golang
steps:
- checkout
- restore_cache:
keys:
- go-mod-v2-{{ checksum "go.sum" }}
- run:
name: lint
command: |
go get github.com/golangci/golangci-lint/cmd/[email protected]
make lint
workflows:
version: 2
test-suite:
jobs:
- setup-dependencies
- lint:
requires:
- setup-dependencies
- update-swagger-docs:
requires:
- setup-dependencies
- setup-dependencies:
# This filter enables the job for tags
filters:
tags:
only:
- /^v.*/
- test-cover:
requires:
- setup-dependencies
- test-sim-nondeterminism:
requires:
- setup-dependencies
filters:
branches:
only:
- develop
- /release.*/
- test-sim-import-export:
requires:
- setup-dependencies
filters:
branches:
only:
- develop
- /release.*/
- test-sim-after-import:
requires:
- setup-dependencies
filters:
branches:
only:
- develop
- /release.*/
- test-sim-multi-seed-short:
requires:
- setup-dependencies
filters:
branches:
only:
- develop
- /release.*/
- test-sim-multi-seed-long:
requires:
- setup-dependencies
# These filters ensure that the long sim only runs during release
filters:
branches:
ignore: /.*/
tags:
only:
- /^v.*/
- test-cover:
requires:
- setup-dependencies
# - upload-coverage:
# requires:
# - test-cover
# - build-docs:
# context: docs-deployment-master
# filters:
# branches:
# only:
# - docs-theme-latest
# - build-docs:
# context: docs-deployment-release
# filters:
# branches:
# only:
# - master
# tags:
# only:
# - /v.*/
- develop
- /release.*/
5 changes: 0 additions & 5 deletions .github/CODEOWNERS

This file was deleted.

38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug-report.md

This file was deleted.

36 changes: 0 additions & 36 deletions .github/ISSUE_TEMPLATE/feature-request.md

This file was deleted.

42 changes: 15 additions & 27 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,22 @@
<!-- < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < < ☺
v ✰ Thanks for creating a PR! ✰
v Before smashing the submit button please review the checkboxes.
v If a checkbox is n/a - please still include it but + a little note why
☺ > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -->

<!--- Provide a general summary of your changes in the Title above -->
Closes: #XXX

## Description
<!--- Describe your changes in detail -->

<!-- Add a description of the changes that this PR introduces and the files that
are the most critical to review.
-->

______

For contributor use:

- [ ] Targeted PR against correct branch (see [CONTRIBUTING.md](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#pr-targeting))
- [ ] Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
- [ ] Code follows the [module structure standards](https://github.com/cosmos/cosmos-sdk/blob/master/docs/building-modules/structure.md).
- [ ] Wrote unit and integration [tests](https://github.com/cosmos/cosmos-sdk/blob/master/CONTRIBUTING.md#testing)
- [ ] Updated relevant documentation (`docs/`) or specification (`x/<module>/spec/`)
- [ ] Added relevant `godoc` [comments](https://blog.golang.org/godoc-documenting-go-code).
- [ ] Added a relevant changelog entry to the `Unreleased` section in `CHANGELOG.md`
- [ ] Re-reviewed `Files changed` in the Github PR explorer
## Motivation and context
<!--- Why is this change required? What problem does it solve? -->
<!--- If it fixes an open issue, please link to the issue here. -->

______
## How has this been tested?
<!--- Please describe in detail how you tested your changes. -->
<!--- Include details of your testing environment, and the tests you ran to -->
<!--- see how your change affects other areas of the code, etc. -->

For admin use:
## Checklist:
<!--- Go over all the following points, and put an `x` in all the boxes that apply. -->
<!--- If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
- [ ] I followed the [contributing guidelines](https://github.com/line/link/blob/master/CONTRIBUTING.md).
- [ ] I have updated the documentation accordingly.
- [ ] I have added tests to cover my changes.

- [ ] Added appropriate labels to PR (ex. `WIP`, `R4R`, `docs`, etc)
- [ ] Reviewers assigned
- [ ] Squashed all commits, uses message "Merge pull request #XYZ: [title]" ([coding standards](https://github.com/tendermint/coding/blob/master/README.md#merging-a-pr))
2 changes: 2 additions & 0 deletions .github/semantic.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
titleAndCommits: true
allowMergeCommits: true
45 changes: 0 additions & 45 deletions .github/stale.yml

This file was deleted.

11 changes: 0 additions & 11 deletions .github/workflows/linkchecker.yml

This file was deleted.

Loading

0 comments on commit 4f99083

Please sign in to comment.