Remove release branch staleness tests.

These are now covered by our daily testing of release branches

PiperOrigin-RevId: 683438670
pull/18623/head
Mike Kruskal 6 months ago committed by Copybara-Service
parent 4e257cfec8
commit cdb496d28f
  1. 32
      .github/scripts/validate_yaml.py
  2. 20
      .github/workflows/staleness_check.yml

@ -65,35 +65,3 @@ for file in yaml_files:
% (step['name'], job)
)
print('PASSED: All steps in all jobs check the continuous-run condition.')
# Check to make sure the list of included branches matches the list of excluded
# branches in staleness_check.yml.
with open(
os.path.join(os.path.dirname(__file__), '../workflows/staleness_check.yml'),
'r',
) as f:
regex_pattern = r"'(\d+\.x)'"
data = yaml.safe_load(f)
matrix = data['jobs']['test']['strategy']['matrix']
included_branches = matrix['branch']
# Main should be included in all test runs
included_branches.remove('main')
excludes = matrix['exclude']
for entry in excludes:
match = re.search(regex_pattern, entry['branch'])
branch = match.group(1)
if branch not in included_branches:
raise ValueError(
'Branch %s is excluded for presubmit runs but is not in the list of'
' matrix branches in staleness_check.yml.' % branch
)
included_branches.remove(branch)
if included_branches:
raise ValueError(
'Branches %s are in the list of matrix branches but do not get excluded'
' for presubmit runs in staleness_check.yml.' % included_branches
)
print(
'PASSED: The list of included branches matches the list of excluded'
' branches in staleness_check.yml.'
)

@ -20,26 +20,14 @@ on:
permissions: {}
jobs:
test:
strategy:
fail-fast: false
matrix:
# TODO Remove this parameterization once the release branch testing is stable.
branch: [main, 25.x, 28.x, 29.x]
os: [{ name: Linux, value: ubuntu-latest}]
exclude:
# If we are in a presubmit run, only test main
- branch: ${{ !inputs.continuous-run && '25.x' }}
- branch: ${{ !inputs.continuous-run && '28.x' }}
- branch: ${{ !inputs.continuous-run && '29.x' }}
name: Test staleness ${{ matrix.os.name }} ${{ github.head_ref && 'PR' || matrix.branch }}
runs-on: ${{ matrix.os.value }}
name: Test staleness
runs-on: ubuntu-latest
if: ${{ github.event.repository.full_name == 'protocolbuffers/protobuf' }}
steps:
- name: Checkout ${{ github.head_ref && 'PR' || matrix.branch }}
- name: Checkout
uses: protocolbuffers/protobuf-ci/checkout@v3
with:
ref: ${{ inputs.safe-checkout || github.head_ref || matrix.branch }}
ref: ${{ inputs.safe-checkout || github.head_ref || github.ref }}
- name: Mark runs associated with commits
if: ${{ github.event_name != 'schedule' && github.event_name != 'workflow_dispatch' }}

Loading…
Cancel
Save