[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:53 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}\``);
+ }
+
+ const comments = await github.paginate(
+ github.rest.issues.listComments,
+ {
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ issue_number: pr.number,
+ per_page: 100,
+ },
+ );
+ const previous = comments.find(
+ comment => comment.user.login === "github-actions[bot]" &&
+ comment.body.includes(marker),
+ );
----------------
kiranchandramohan wrote:
https://github.com/llvm/llvm-project/pull/221766/commits/04a1c1c5075455bcf7fce3861e963cc3233b6ee0 has this change.
https://github.com/llvm/llvm-project/pull/221766
More information about the llvm-commits
mailing list