Skip to content

[CI][Github] Add Workflow to Run Python Tests in CI Folder #148696

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

boomanaiden154
Copy link
Contributor

This patch adds a new GHA workflow that runs pytest inside of the .ci directory to test all of the CI infrastructure. This is to make it more visible to new contributors that these tests exist and also to ensure that they are passing before merge. There have been several instances already where someone neglected to update these tests and we should have automation to enforce this.

This patch adds a new GHA workflow that runs pytest inside of the .ci
directory to test all of the CI infrastructure. This is to make it more
visible to new contributors that these tests exist and also to ensure
that they are passing before merge. There have been several instances
already where someone neglected to update these tests and we should have
automation to enforce this.
@boomanaiden154
Copy link
Contributor Author

Currently just runs pytest in the folder. I might look into adding other things later as needed/when I have time.

@boomanaiden154 boomanaiden154 marked this pull request as ready for review July 14, 2025 23:29
@llvmbot
Copy link
Member

llvmbot commented Jul 14, 2025

@llvm/pr-subscribers-github-workflow

Author: Aiden Grossman (boomanaiden154)

Changes

This patch adds a new GHA workflow that runs pytest inside of the .ci directory to test all of the CI infrastructure. This is to make it more visible to new contributors that these tests exist and also to ensure that they are passing before merge. There have been several instances already where someone neglected to update these tests and we should have automation to enforce this.


Full diff: https://github.com/llvm/llvm-project/pull/148696.diff

1 Files Affected:

  • (added) .github/workflows/check-ci.yml (+37)
diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml
new file mode 100644
index 0000000000000..f02fcb96b15f3
--- /dev/null
+++ b/.github/workflows/check-ci.yml
@@ -0,0 +1,37 @@
+name: Check CI
+
+permissions:
+  contents: read
+
+on:
+  push:
+    paths:
+     - '.ci/**'
+     - '.github/workflows/check-ci.yml'
+  pull_request:
+    paths:
+     - '.ci/**'
+     - '.github/workflows/check-ci.yml'
+
+jobs:
+  test-python:
+    name: "Check Python Tests"
+    runs-on: ubuntu-24.04
+    if: github.repository == 'llvm/llvm-project'
+    steps:
+      - name: Fetch LLVM sources
+        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
+        with:
+          sparse-checkout: .ci
+      - name: Setup Python
+        uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
+        with:
+          python-version: 3.13
+          cache: 'pip'
+      - name: Install Python Dependencies
+        run: |
+          pip3 install -r .ci/all_requirements.txt
+          pip3 install pytest==8.4.1
+      - name: Run Tests
+        working-directory: .ci
+        run: pytest

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants