feat: auto labeler, cleanup github actions (#103)

* feat: auto labeler, cleanup github actions

* labeler GA
This commit is contained in:
Federico Kunze 2021-06-09 04:11:23 -04:00 committed by GitHub
parent 16cb56d270
commit d18f41956d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 62 additions and 175 deletions

37
.github/labeler.yml vendored Normal file
View File

@ -0,0 +1,37 @@
"C:Crypto":
- crypto/**/*
"C:Encoding":
- encoding/**/*
"C:JSON-RPC":
- ethereum/rpc/**/*
"C:Proto":
- proto/**/*
- third_party/**/*
- /**/*.pb.go
- /**/*.pb.gw.go
"C:Types":
- types/**/*
"C:x/evm":
- x/evm/**/*/
"Type: Build":
- Makefile
- Dockerfile
- docker-compose.yml
- scripts/*
- config.yml
"Type: CI":
- .github/**/*.yml
- buf.yaml
- .mergify.yml
- .golangci.yml
"C:CLI":
- client/**/*
- x/*/client/**/*
"Type: Tests":
- tests/**/*
- /**/*/*_test.go
"Type: Docs":
- docs/**/*
- x/*/spec/**/*
"Type: ADR":
- docs/architecture/**/*

View File

@ -2,7 +2,7 @@ name: Build
on: on:
pull_request: pull_request:
branches: branches:
- "development" - main
jobs: jobs:
cleanup-runs: cleanup-runs:
@ -11,7 +11,7 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master - uses: rokroskar/workflow-run-cleanup-action@master
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/development'" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest

View File

@ -2,7 +2,7 @@ name: Deploy Contract
on: on:
pull_request: pull_request:
branches: branches:
- "development" - main
jobs: jobs:
cleanup-runs: cleanup-runs:
@ -11,7 +11,7 @@ jobs:
- uses: rokroskar/workflow-run-cleanup-action@master - uses: rokroskar/workflow-run-cleanup-action@master
env: env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/development'" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/main'"
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest

14
.github/workflows/labeler.yml vendored Normal file
View File

@ -0,0 +1,14 @@
name: "Pull Request Labeler"
on:
pull_request:
push:
branches:
- main
jobs:
triage:
runs-on: ubuntu-latest
steps:
- uses: actions/labeler@v3
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

View File

@ -1,42 +0,0 @@
name: Release Sims
# Release Sims workflow runs long-lived (multi-seed & large block size) simulations of 500 blocks.
# This workflow only runs on a pull request when the branch contains rc** (rc1/vX.X.x)
# This release workflow *cannot* be skipped with the 'skip-sims' commit message.
on:
pull_request:
branches:
- "rc**"
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/development'"
# install-runsim:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# steps:
# - name: install runsim
# run: |
# export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
# - uses: actions/cache@v2.1.3
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# test-sim-multi-seed-long:
# runs-on: ubuntu-latest
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: actions/cache@v2.1.3
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# - name: test-sim-multi-seed-long
# run: |
# make test-sim-multi-seed-long

View File

@ -1,121 +0,0 @@
name: Sims
# Sims workflow runs multiple types of simulations (nondeterminism, import-export, after-import, multi-seed-short)
# This workflow will run on all Pull Requests, if a .go, .mod or .sum file have been changed.
# The simulations can be skipped if the commit message contains the 'skip-sims' string.
on:
pull_request:
push:
branches:
- development
jobs:
cleanup-runs:
runs-on: ubuntu-latest
if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/development'"
steps:
- uses: rokroskar/workflow-run-cleanup-action@master
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# install-runsim:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# steps:
# - uses: actions/setup-go@v2.1.2
# - name: install runsim
# run: |
# export GO111MODULE="on" && go get github.com/cosmos/tools/cmd/runsim@v1.0.0
# - uses: actions/cache@v2.1.1
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# test-sim-nondeterminism:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: technote-space/get-diff-action@v3.2
# with:
# SUFFIX_FILTER: |
# .go
# .mod
# .sum
# SET_ENV_NAME_INSERTIONS: 1
# SET_ENV_NAME_LINES: 1
# - uses: actions/cache@v2.1.1
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# if: "env.GIT_DIFF != ''"
# - name: test-sim-nondeterminism
# run: |
# make test-sim-nondeterminism
# if: "env.GIT_DIFF != ''"
# test-sim-import-export:
# runs-on: ubuntu-latest
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: technote-space/get-diff-action@v3.2
# with:
# SUFFIX_FILTER: |
# .go
# .mod
# .sum
# SET_ENV_NAME_INSERTIONS: 1
# SET_ENV_NAME_LINES: 1
# - uses: actions/cache@v2.1.1
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# if: "env.GIT_DIFF != ''"
# - name: test-sim-import-export
# run: |
# make test-sim-import-export
# if: "env.GIT_DIFF != ''"
# test-sim-after-import:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: technote-space/get-diff-action@v3.2
# with:
# SUFFIX_FILTER: |
# .go
# .mod
# .sum
# SET_ENV_NAME_INSERTIONS: 1
# SET_ENV_NAME_LINES: 1
# - uses: actions/cache@v2.1.1
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# if: "env.GIT_DIFF != ''"
# - name: test-sim-after-import
# run: |
# make test-sim-after-import
# if: "env.GIT_DIFF != ''"
# test-sim-multi-seed-short:
# runs-on: ubuntu-latest
# if: "!contains(github.event.head_commit.message, 'skip-sims')"
# needs: install-runsim
# steps:
# - uses: actions/checkout@v2
# - uses: technote-space/get-diff-action@v3.2
# with:
# SUFFIX_FILTER: |
# .go
# .mod
# .sum
# SET_ENV_NAME_INSERTIONS: 1
# SET_ENV_NAME_LINES: 1
# - uses: actions/cache@v2.1.1
# with:
# path: ~/go/bin
# key: ${{ runner.os }}-go-runsim-binary
# if: "env.GIT_DIFF != ''"
# - name: test-sim-multi-seed-short
# run: |
# make test-sim-multi-seed-short
# if: "env.GIT_DIFF != ''"

View File

@ -11,12 +11,11 @@ jobs:
with: with:
repo-token: ${{ secrets.GITHUB_TOKEN }} repo-token: ${{ secrets.GITHUB_TOKEN }}
stale-pr-message: "This pull request has been automatically marked as stale because it has not had stale-pr-message: "This pull request has been automatically marked as stale because it has not had
recent activity. It will be closed in 7 days-before-close if no further activity occurs. Thank you recent activity. It will be closed in 7 days-before-close if no further activity occurs."
for your contributions." stale-issue-message: "This issue is stale because it has been open 45 days with no activity. Remove `Status: Stale` label or comment or this will be closed in 7 days."
stale-issue-message: "This issue is stale because it has been open 45 days with no activity. Remove `stale` label or comment or this will be closed in 7 days."
days-before-stale: 45 days-before-stale: 45
days-before-close: 7 days-before-close: 7
exempt-issue-labels: "Status: On Ice, Status: Blocked, Type: Bug, Type: Security, Type: Meta-Issue, Type: Enhancement, Epic" exempt-issue-labels: "Status: Blocked, Type: Bug, pinned, automerge"
exempt-pr-labels: "Status: On Ice, Status: Blocked, Type: Bug, Type: Security, Type: Meta-Issue, Type: Enhancement, Epic" exempt-pr-labels: "Status: Blocked, Type: Bug, pinned, automerge"
stale-pr-label: "stale" stale-pr-label: "Status: Stale"
stale-issue-label: "stale" stale-issue-label: "Status: Stale"

View File

@ -5,7 +5,7 @@ on:
pull_request: pull_request:
push: push:
branches: branches:
- development - main
jobs: jobs:
test-rpc: test-rpc:
runs-on: ubuntu-latest runs-on: ubuntu-latest