[llvm] [Flang] Github action to check for integration tests (PR #221766)

Kiran Chandramohan via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 14:11:16 PDT 2026


================
@@ -0,0 +1,102 @@
+name: Flang integration test check
+
+on:
+  pull_request:
+    types: [opened, synchronize, reopened]
+    paths:
+      - "flang/**"
+      - ".github/workflows/flang-integration-test-check.yml"
+
+permissions:
+  contents: read
+  pull-requests: read
+
+jobs:
+  check-for-full-pipeline-tests:
+    if: github.repository == 'llvm/llvm-project'
+    runs-on: ubuntu-24.04
+    steps:
+      - name: Check for new full-pipeline test invocations
+        uses: actions/github-script at 3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
+        with:
+          script: |
+            const fs = require("fs");
+            const marker = "<!-- flang-integration-test-check -->";
+            const pr = context.payload.pull_request;
+
+            const files = await github.paginate(
+              github.rest.pulls.listFiles,
+              {
+                owner: context.repo.owner,
+                repo: context.repo.repo,
+                pull_number: pr.number,
+                per_page: 100,
+              },
+            );
+
+            const findings = [];
+            for (const file of files) {
+              if (!file.filename.startsWith("flang/test/") || !file.patch)
+                continue;
+
+              // Only report newly added uses. Existing full-pipeline tests do
+              // not need to be justified again when an unrelated line changes.
+              const addsEmitLLVM = file.patch.split("\n").some(
+                line => /^\+(?!\+\+)/.test(line) && /\bRUN:/.test(line) &&
+                  /(^|\s)-emit-llvm(?=\s|=|$)/.test(line),
+              );
+              if (addsEmitLLVM)
+                findings.push(`- \`${file.filename}\``);
----------------
kiranchandramohan wrote:

https://github.com/llvm/llvm-project/pull/221766/changes/f5ab1140e1442ce683a1e2c98a33fdaa5592c5e5 has these changes. 

https://github.com/llvm/llvm-project/pull/221766


More information about the llvm-commits mailing list