From 48aa1133f3f5259d3a92d1f0934eb7069886cd0b Mon Sep 17 00:00:00 2001 From: Federico Kunze Date: Thu, 7 Jan 2021 10:45:27 -0300 Subject: [PATCH] workflows: update branch target to main --- .github/workflows/build-latest-sdk.yml | 38 -------------------------- .github/workflows/lint.yml | 4 +-- .github/workflows/release-sims.yml | 2 +- .github/workflows/sims.yml | 2 +- .github/workflows/test.yml | 2 +- .mergify.yml | 4 +-- CONTRIBUTING.md | 32 +++++++++++----------- Makefile | 4 +-- README.md | 4 +-- 9 files changed, 27 insertions(+), 65 deletions(-) delete mode 100644 .github/workflows/build-latest-sdk.yml diff --git a/.github/workflows/build-latest-sdk.yml b/.github/workflows/build-latest-sdk.yml deleted file mode 100644 index 7bd49836..00000000 --- a/.github/workflows/build-latest-sdk.yml +++ /dev/null @@ -1,38 +0,0 @@ -name: Build Against Cosmos-SDK master -on: [pull_request] -jobs: - cleanup-runs: - runs-on: ubuntu-latest - steps: - - uses: rokroskar/workflow-run-cleanup-action@master - env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" - - build-vs-cosmos-sdk-master: - runs-on: ubuntu-latest - if: "!contains(github.event.head_commit.message, 'skip-tests')" - steps: - - uses: actions/setup-go@v1 - id: go - with: - go-version: 1.14 - - name: Setup env for GO - # this is only used until the setup-go action is updated - run: | - echo "::set-env name=GOPATH::$(go env GOPATH)" - echo "::add-path::$(go env GOPATH)/bin" - shell: bash - - uses: actions/checkout@v2 - - name: Patch modules - run: | - for ext in mod sum; do cp -v go.${ext} go.${ext}.bak ; done - go get github.com/cosmos/cosmos-sdk@master ; go mod tidy - - name: Build if changes are detected - run: | - trap 'for ext in mod sum; do mv -v go.${ext}.bak go.${ext} ; done' EXIT - if diff -u go.mod.bak go.mod ; then - echo This revision requires no changes to build against github.com/cosmos/cosmos-sdk@master - exit 0 - fi - make build diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 5c4bb3bb..53356e6c 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,12 +1,12 @@ name: Lint # Lint runs golangci-lint over the entire sommelier repository -# This workflow is run on every pull request and push to master +# This workflow is run on every pull request and push to main # The `golangci` job will pass without running if no *.{go, mod, sum} files have been modified. on: pull_request: push: branches: - - master + - main jobs: golangci: name: golangci-lint diff --git a/.github/workflows/release-sims.yml b/.github/workflows/release-sims.yml index 6bfc824a..f14422f6 100644 --- a/.github/workflows/release-sims.yml +++ b/.github/workflows/release-sims.yml @@ -11,7 +11,7 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest diff --git a/.github/workflows/sims.yml b/.github/workflows/sims.yml index b102eb02..b172f4c7 100644 --- a/.github/workflows/sims.yml +++ b/.github/workflows/sims.yml @@ -7,7 +7,7 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" build: runs-on: ubuntu-latest diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 270e9bef..ac8a95ef 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,7 +7,7 @@ jobs: - uses: rokroskar/workflow-run-cleanup-action@master env: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" - if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" + if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'" test-coverage-upload: runs-on: ubuntu-latest diff --git a/.mergify.yml b/.mergify.yml index fbf9d701..ecc27fff 100644 --- a/.mergify.yml +++ b/.mergify.yml @@ -1,8 +1,8 @@ pull_request_rules: - - name: automerge to master with label automerge and branch protection passing + - name: automerge to main with label automerge and branch protection passing conditions: - "#approved-reviews-by>1" - - base=master + - base=main - label=automerge actions: merge: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8b436e40..6a7d820f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -32,7 +32,7 @@ contributors, the general procedure for contributing has been established: make a comment on the issue to inform the community of your intentions to begin work 4. Follow standard Github best practices: fork the repo, branch from the - HEAD of `master`, make some commits, and submit a PR to `master` + HEAD of `main`, make some commits, and submit a PR to `main` - For core developers working within the cosmos-sdk repo, to ensure a clear ownership of branches, branches must be named with the convention `{moniker}/{issue#}-branch-name` @@ -105,13 +105,13 @@ For instance, to create a fork and work on a branch of it, I would: - `git remote add origin git@github.com:rigeyrigerige/Sommelier.git` Now `origin` refers to my fork and `upstream` refers to the Sommelier version. -So I can `git push -u origin master` to update my fork, and make pull requests to Sommelier from there. +So I can `git push -u origin main` to update my fork, and make pull requests to Sommelier from there. Of course, replace `rigeyrigerige` with your git handle. To pull in updates from the origin repo, run - `git fetch upstream` -- `git rebase upstream/master` (or whatever branch you want) +- `git rebase upstream/main` (or whatever branch you want) Please don't make Pull Requests to `main`. @@ -171,39 +171,39 @@ Sommelier utilizes [semantic versioning](https://semver.org/). Ensure that you base and target your PR on the `main` branch. -All feature additions should be targeted against `master`. Bug fixes for an outstanding release candidate +All feature additions should be targeted against `main`. Bug fixes for an outstanding release candidate should be targeted against the release candidate branch. Release candidate branches themselves should be the -only pull requests targeted directly against master. +only pull requests targeted directly against main. ### Development Procedure -- the latest state of development is on `master` -- `master` must never fail `make test` or `make test_cli` -- `master` should not fail `make lint` -- no `--force` onto `master` (except when reverting a broken commit, which should seldom happen) +- the latest state of development is on `main` +- `main` must never fail `make test` or `make test_cli` +- `main` should not fail `make lint` +- no `--force` onto `main` (except when reverting a broken commit, which should seldom happen) - create a development branch either on github.com/peggyjv/sommelier, or your fork (using `git remote add origin`) -- before submitting a pull request, begin `git rebase` on top of `master` +- before submitting a pull request, begin `git rebase` on top of `main` ### Pull Merge Procedure -- ensure pull branch is rebased on `master` +- ensure pull branch is rebased on `main` - run `make test` and `make test_cli` to ensure that all tests pass - merge pull request ### Release Procedure -- Start on `master` +- Start on `main` - Create the release candidate branch `rc/v*` (going forward known as **RC**) and ensure it's protected against pushing from anyone except the release manager/coordinator - **no PRs targeting this branch should be merged unless exceptional circumstances arise** - On the `RC` branch, prepare a new version section in the `CHANGELOG.md` and kick off a large round of simulation testing (e.g. 400 seeds for 2k blocks) -- If errors are found during the simulation testing, commit the fixes to `master` +- If errors are found during the simulation testing, commit the fixes to `main` and create a new `RC` branch (making sure to increment the `rcN`) - After simulation has successfully completed, create the release branch (`release/vX.XX.X`) from the `RC` branch -- Merge the release branch to `master` to incorporate the `CHANGELOG.md` updates +- Merge the release branch to `main` to incorporate the `CHANGELOG.md` updates - Delete the `RC` branches ### Point Release Procedure @@ -213,7 +213,7 @@ releases will be based off of that release. - start on `vX.XX.X` - checkout a new branch `rcN/vX.X.X` -- cherry pick the desired changes from `master` +- cherry pick the desired changes from `main` - these changes should be small and NON-BREAKING (both API and state machine) - add entries to CHANGELOG.md and remove corresponding pending log entries - checkout a new branch `release/vX.X.X` based off of the previous release @@ -221,5 +221,5 @@ releases will be based off of that release. - run tests and simulations (noted in [Release Procedure](#release-procedure)) - after tests and simulation have successfully completed, merge the `RC` branch into `release/vX.X.X` - Make sure to delete the `RC` branch -- create a PR into `master` containing ONLY the CHANGELOG.md updates +- create a PR into `main` containing ONLY the CHANGELOG.md updates - tag (use `git tag -a`) then push the tags (`git push --tags`) diff --git a/Makefile b/Makefile index 839c3742..f3edd0e2 100644 --- a/Makefile +++ b/Makefile @@ -233,11 +233,11 @@ proto-lint: @$(DOCKER_BUF) check lint --error-format=json proto-check-breaking: - @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=master + @$(DOCKER_BUF) check breaking --against-input $(HTTPS_GIT)#branch=main TM_URL = https://raw.githubusercontent.com/tendermint/tendermint/v0.34.0/proto/tendermint GOGO_PROTO_URL = https://raw.githubusercontent.com/regen-network/protobuf/cosmos -COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/master +COSMOS_PROTO_URL = https://raw.githubusercontent.com/regen-network/cosmos-proto/main COSMOS_SDK_PROTO_URL = https://raw.githubusercontent.com/cosmos/cosmos-sdk/v0.40.0-rc6/proto/cosmos/base TM_CRYPTO_TYPES = third_party/proto/tendermint/crypto diff --git a/README.md b/README.md index 31c272d4..07978498 100644 --- a/README.md +++ b/README.md @@ -2,9 +2,9 @@ Sommelier 3.0 is a test version of the Stargate binaries. -[![codecov](https://codecov.io/gh/peggyjv/sommelier/branch/master/graph/badge.svg)](https://codecov.io/gh/peggyjv/sommelier) +[![codecov](https://codecov.io/gh/peggyjv/sommelier/branch/main/graph/badge.svg)](https://codecov.io/gh/peggyjv/sommelier) [![Go Report Card](https://goreportcard.com/badge/github.com/peggyjv/sommelier)](https://goreportcard.com/report/github.com/peggyjv/sommelier) -[![license](https://img.shields.io/github/license/peggyjv/sommelier.svg)](https://github.com/peggyjv/sommelier/blob/master/LICENSE) +[![license](https://img.shields.io/github/license/peggyjv/sommelier.svg)](https://github.com/peggyjv/sommelier/blob/main/LICENSE) [![LoC](https://tokei.rs/b1/github/peggyjv/sommelier)](https://github.com/peggyjv/sommelier) [![GolangCI](https://golangci.com/badges/github.com/peggyjv/sommelier.svg)](https://golangci.com/r/github.com/peggyjv/sommelier)