jdaugherty commented on code in PR #16059:
URL: https://github.com/apache/grails-core/pull/16059#discussion_r3674987689


##########
.github/workflows/end-to-end.yml:
##########
@@ -0,0 +1,140 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# The end-to-end suite is its own Gradle build, so the core build never 
reaches it and
+# `./gradlew build` at the root is unaffected.
+#
+# It resolves Grails from the artifacts the core build publishes rather than 
by project
+# substitution - that is what makes the tests end-to-end. The repository is 
the same
+# build/local-maven that grails-forge points its generated applications at, 
populated by
+# publishAllPublicationsToTestCaseMavenRepoRepository, so the suite exercises 
real poms and
+# module metadata including the CLI companion artifacts.
+#
+# It also needs two JDKs, which is the other reason it gets its own workflow: 
the Grails 7
+# fixture must be compiled on Java 17 (the minimum for a Grails 7 app, so the 
binary matches
+# what a real Grails 7 plugin is built with), while the core build and the 
Grails 8
+# application consuming the fixture need 21. The Grails 8 side simply tracks 
the repository's
+# root .sdkmanrc - it has to run on whatever the core build it consumes runs 
on - and only the
+# fixture carries its own pin. The steps below read both out of those files 
rather than relying
+# on Gradle toolchain auto-detection.
+name: "End to End"
+on:
+  workflow_dispatch:
+  push:
+    branches:
+      - '[0-9]+.[0-9]+.x'
+      # The legacy command compatibility work these tests cover is still in 
review. Run the suite
+      # on its branch so the result is visible on the pull request; drop this 
entry once it merges.
+      - 'feat/8.0.x-legacy-command-compat'
+    paths:
+      - 'end-to-end/**'
+      - 'grails-core/**'
+      - 'grails-core-cli-legacy/**'
+      - 'grails-console/**'
+      - 'grails-gradle/**'
+      - '.github/workflows/end-to-end.yml'
+  pull_request:
+    paths:
+      - 'end-to-end/**'
+      - 'grails-core/**'
+      - 'grails-core-cli-legacy/**'
+      - 'grails-console/**'
+      - 'grails-gradle/**'
+      - '.github/workflows/end-to-end.yml'
+concurrency:
+  group: ${{ github.workflow }}-${{ github.ref }}
+  cancel-in-progress: ${{ github.event_name == 'pull_request' }}
+jobs:
+  endToEnd:
+    name: "End to End Tests (end-to-end build only)"
+    if: ${{ !contains(github.event.head_commit.message, '[skip tests]') }}
+    runs-on: ubuntu-24.04
+    steps:
+      - name: "📥 Checkout repository"
+        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # 
v6.0.2
+      - name: "☕️ Determine JDKs from .sdkmanrc"
+        # Read both pins out of the files that already declare them, so the 
workflow cannot
+        # drift from what a developer gets with `sdk env`.
+        id: jdks
+        run: |
+          set -euo pipefail
+          fixture_java=$(grep -E '^java=' 
end-to-end/legacy-g7-command-plugin/.sdkmanrc | cut -d= -f2)
+          build_java=$(grep -E '^java=' .sdkmanrc | cut -d= -f2)
+          echo "fixture-java=${fixture_java%%.*}" >> "$GITHUB_OUTPUT"
+          echo "build-java=${build_java%%.*}" >> "$GITHUB_OUTPUT"

Review Comment:
   FYI: this is intentionally not pinned because we don't verify test apps as 
part of being reproducible.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to