diff --git a/.github/workflows/go-ci.yml b/.github/workflows/go-ci.yml index 4b8a0233..9358f2c4 100644 --- a/.github/workflows/go-ci.yml +++ b/.github/workflows/go-ci.yml @@ -7,6 +7,37 @@ on: - main pull_request: jobs: + lint: + name: Lint + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: 1.20 + + - name: golangci-lint + uses: golangci/golangci-lint-action@v3.4.0 + with: + version: v1.49.0 + + go_mod_tidy_check: + name: Go Mod Tidy Check + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-go@v3 + with: + go-version: 1.20 + + - run: go mod tidy + + - name: check for diff + run: git diff --exit-code build: runs-on: ubuntu-latest diff --git a/.github/workflows/labels.yml b/.github/workflows/labels.yml new file mode 100644 index 00000000..6d1d1cb2 --- /dev/null +++ b/.github/workflows/labels.yml @@ -0,0 +1,19 @@ +name: Required Labels + +on: + pull_request: + types: [opened, labeled, unlabeled, synchronize] + +concurrency: + group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + +jobs: + label: + runs-on: ubuntu-latest + steps: + - uses: mheap/github-action-required-labels@v3 + with: + mode: minimum + count: 1 + labels: "kind:fix, kind:misc, kind:break!, kind:refactor, kind:feat, kind:deps, kind:docs, kind:ci, kind:chore, kind:perf" # yamllint disable-line rule:line-length