diff --git a/.github/scripts/check_and_update_jdk.py b/.github/scripts/check_and_update_jdk.py index 382fb942c..0b0cab8c2 100644 --- a/.github/scripts/check_and_update_jdk.py +++ b/.github/scripts/check_and_update_jdk.py @@ -9,7 +9,7 @@ # Query the Oracle website for the latest JDK version response = requests.get('http://javadl-esd-secure.oracle.com/update/baseline.version') -latest_jdk = re.search(r'(?P\d+)\.', response.text) +latest_jdk = re.search(r'(?P\d+)\.?', response.text) if latest_jdk is None: print('Failed to retrieve latest JDK version') exit(1) @@ -33,10 +33,6 @@ uri_base = 'https://ci.eclipse.org/ls/job/jdt-ls-master/lastCompletedBuild/testReport/org.eclipse.jdt.ls.core.internal.{package}/{java_class}/{method}/api/python' # Define the test URLs to check using the template and list comprehension tests = [ - uri_base.format(package='correction', java_class='ModifierCorrectionsQuickFixTest', method=m) for m in ['testAddSealedMissingClassModifierProposal', 'testAddSealedAsDirectSuperClass', 'testAddPermitsToDirectSuperClass'] - ] + [ - uri_base.format(package='correction', java_class='UnresolvedTypesQuickFixTest', method='testTypeInSealedTypeDeclaration') - ] + [ uri_base.format(package='managers', java_class=c, method=m) for c, m in [('EclipseProjectImporterTest', 'testPreviewFeaturesDisabledByDefault'), ('InvisibleProjectImporterTest', 'testPreviewFeaturesEnabledByDefault'), ('MavenProjectImporterTest', f'testJava{latest_jdk}Project')] ] @@ -61,11 +57,11 @@ # Replace the ~ with current_jdk readme_ver_pattern = re.sub('~', current_jdk, readme_ver_pattern) - + # Write this to a file for the create-pull-request workflow with open('latest_jdk.txt', 'w') as f: f.write(latest_jdk) - + # Replace the current supported JDK version with the latest JDK version readme = re.sub(readme_ver_pattern, latest_jdk, readme)