Skip to content

Commit 0fdc841

Browse files
authored
Merge branch 'main' into tim/java-parser-jabref-fixes
2 parents 27b7e77 + ea81d80 commit 0fdc841

182 files changed

Lines changed: 15739 additions & 1879 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 42 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,45 @@ concurrency:
2020

2121
jobs:
2222
build:
23-
uses: openrewrite/gh-automation/.github/workflows/ci-gradle.yml@main
24-
with:
25-
java_version: |
26-
25
27-
21
28-
secrets:
29-
gradle_enterprise_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
30-
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
31-
sonatype_token: ${{ secrets.SONATYPE_TOKEN}}
32-
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
33-
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
34-
OPS_GITHUB_ACTIONS_WEBHOOK: ${{ secrets.OPS_GITHUB_ACTIONS_WEBHOOK }}
35-
node_auth_token: ${{ secrets.NPM_TOKEN }}
36-
pypi_token: ${{ secrets.PYPI_OPENREWRITE_PUBLISH }}
37-
nuget_api_key: ${{ secrets.NUGET_API_KEY }}
23+
runs-on: ubuntu-latest
24+
if: github.event_name != 'schedule' || github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc'
25+
steps:
26+
- uses: openrewrite/gh-automation/.github/actions/setup@main
27+
with:
28+
java_version: |
29+
25
30+
21
31+
develocity_access_key: ${{ secrets.GRADLE_ENTERPRISE_ACCESS_KEY }}
32+
33+
# Route Maven resolution through Moderne's Artifactory cache to avoid
34+
# Maven Central rate-limiting (HTTP 404 + Retry-After) under parallel
35+
# test load. Picked up by MavenSettingsAutoLoadingExtension at test time.
36+
- uses: s4u/maven-settings-action@v3.1.0
37+
with:
38+
mirrors: '[{"id": "moderne-cache", "name": "Moderne Artifactory Cache", "mirrorOf": "*", "url": "https://artifactory.moderne.ninja/artifactory/moderne-cache-3/"}]'
39+
servers: '[{"id": "moderne-cache", "username": "${{ secrets.ARTIFACTORY_USERNAME }}", "password": "${{ secrets.ARTIFACTORY_PASSWORD }}"}]'
40+
41+
- uses: openrewrite/gh-automation/.github/actions/build@main
42+
env:
43+
REWRITE_GRADLE_MIRROR_URL: https://artifactory.moderne.ninja/artifactory/moderne-cache-3/
44+
REWRITE_GRADLE_MIRROR_USERNAME: ${{ secrets.ARTIFACTORY_USERNAME }}
45+
REWRITE_GRADLE_MIRROR_PASSWORD: ${{ secrets.ARTIFACTORY_PASSWORD }}
46+
47+
- if: failure() && github.event_name == 'schedule' && (github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
48+
uses: openrewrite/gh-automation/.github/actions/slack-failure@main
49+
with:
50+
webhook: ${{ secrets.OPS_GITHUB_ACTIONS_WEBHOOK }}
51+
52+
- if: >
53+
github.event_name != 'pull_request' &&
54+
github.ref == 'refs/heads/main' &&
55+
(github.repository_owner == 'openrewrite' || github.repository_owner == 'moderneinc')
56+
uses: openrewrite/gh-automation/.github/actions/publish-snapshots@main
57+
with:
58+
sonatype_username: ${{ secrets.SONATYPE_USERNAME }}
59+
sonatype_token: ${{ secrets.SONATYPE_TOKEN }}
60+
ossrh_signing_key: ${{ secrets.OSSRH_SIGNING_KEY }}
61+
ossrh_signing_password: ${{ secrets.OSSRH_SIGNING_PASSWORD }}
62+
node_auth_token: ${{ secrets.NPM_TOKEN }}
63+
pypi_token: ${{ secrets.PYPI_OPENREWRITE_PUBLISH }}
64+
nuget_api_key: ${{ secrets.NUGET_API_KEY }}

rewrite-go/.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
rewrite/test-classpath.txt
1+
test-classpath.txt
2+
/rpc

rewrite-go/Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: test parity
2+
3+
# Default test run — what CI executes. Build-tag-gated tests stay out.
4+
test:
5+
go test ./...
6+
7+
# Printer fidelity audit. Loads every fixture under
8+
# test/printer-corpus/, parses + prints, and asserts byte-equality.
9+
# Gated behind the `parityaudit` build tag so it never runs in CI;
10+
# devs invoke it manually when investigating printer regressions.
11+
#
12+
# Trade-off (per the eng review's P2 decision): corpus regressions ship
13+
# undetected by automation in exchange for fast iteration and simple
14+
# test infra. Re-evaluate if a corpus-detectable bug ever lands.
15+
parity:
16+
go test -tags parityaudit ./pkg/printer/...

rewrite-go/PLAN.md

Lines changed: 0 additions & 63 deletions
This file was deleted.

rewrite-go/build.gradle.kts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ tasks.withType<Javadoc>().configureEach {
3030
exclude("**/G.java")
3131
}
3232

33+
// Test fixtures for the GoMod conformance corpus are .gomod / .gosum / .json
34+
// files; none of these formats accept a leading license header.
35+
configure<nl.javadude.gradle.plugins.license.LicenseExtension> {
36+
excludePatterns.addAll(listOf("**/*.gomod", "**/*.gosum", "**/*.json"))
37+
}
38+
3339
val goBuild = tasks.register<Exec>("goBuild") {
3440
workingDir = projectDir
3541
// Use relative path to avoid absolute paths in cache key (Exec args are cache inputs)

0 commit comments

Comments
 (0)