diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1ec8039073f..b6fe43bb10b 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -7,6 +7,7 @@ on: branches: - 'master' pull_request: + types: [opened, synchronize, reopened, edited] paths-ignore: - packaging/** branches: @@ -15,6 +16,7 @@ on: jobs: test: name: Test + if: github.event.action != 'edited' runs-on: ${{ matrix.os }} strategy: matrix: @@ -37,6 +39,7 @@ jobs: run: make test-ci test-flaky: name: Test (flaky) + if: github.event.action != 'edited' runs-on: ubuntu-latest continue-on-error: ${{ github.ref == 'refs/heads/master' }} steps: @@ -63,9 +66,26 @@ jobs: with: cache: false go-version-file: go.mod + - name: Setup Node.js + if: github.event_name == 'pull_request' + uses: actions/setup-node@v4 + with: + node-version: '20' + - name: Install commitlint + if: github.event_name == 'pull_request' + run: | + npm install --save-dev @commitlint/cli @commitlint/config-conventional + - name: PR title linting + if: github.event_name == 'pull_request' + env: + PR_TITLE: ${{ github.event.pull_request.title }} + run: | + echo "$PR_TITLE" | npx commitlint --config ./commitlint.config.js - name: Commit linting if: github.ref != 'refs/heads/master' uses: wagoid/commitlint-github-action@v5 + with: + configFile: commitlint.config.js - name: GolangCI-Lint uses: golangci/golangci-lint-action@v8 with: