Skip code coverage generation on cherry-pick PRs (#33068)

* Skip code coverage generation on cherry-picks

* Skip upload step for webapp coverage for cherry-picks
Этот коммит содержится в:
Claudio Costa
2025-07-04 07:48:06 -06:00
коммит произвёл GitHub
родитель cbf685b2f4
Коммит 10b6784968
3 изменённых файлов: 5 добавлений и 0 удалений

2
.github/workflows/server-ci-template.yml поставляемый
Просмотреть файл

@@ -265,6 +265,8 @@ jobs:
drivername: mysql
logsartifact: mysql-server-test-logs
test-coverage:
# Skip coverage generation for cherry-pick PRs into release branches.
if: ${{ github.event_name != 'pull_request' || !startsWith(github.event.pull_request.base.ref, 'release-') }}
name: Generate Test Coverage
needs: check-mattermost-vet
uses: ./.github/workflows/server-test-template.yml

1
.github/workflows/server-test-template.yml поставляемый
Просмотреть файл

@@ -78,6 +78,7 @@ jobs:
$BUILD_IMAGE \
make test-server$RACE_MODE BUILD_NUMBER=$GITHUB_HEAD_REF-$GITHUB_RUN_ID
- name: Upload coverage to Codecov
if: ${{ inputs.enablecoverage }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}

2
.github/workflows/webapp-ci-template.yml поставляемый
Просмотреть файл

@@ -79,6 +79,8 @@ jobs:
run: |
npm run test-ci
- name: Upload coverage to Codecov
# Skip coverage upload for cherry-pick PRs into release branches.
if: ${{ github.event_name != 'pull_request' || !startsWith(github.event.pull_request.base.ref, 'release-') }}
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}