From bda217315776bf63f9b32a99c41650582ec7e74c Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 14 Jul 2025 18:23:50 +0000 Subject: [PATCH 1/5] [CI][Github] Add Workflow to Run Python Tests in CI Folder 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. --- .github/workflows/check-ci.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/check-ci.yml diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml new file mode 100644 index 0000000000000..ef05f59b81a6f --- /dev/null +++ b/.github/workflows/check-ci.yml @@ -0,0 +1,33 @@ +name: Check CI + +permissions: + contents: read + +on: + push: + paths: + - '.ci/**' + pull_request: + paths: + - '.ci/**' + +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 + - name: Run Tests + working-direcotry: .ci + run: pytest From 7a8fc27f4c0f90872829302e05913795b439910a Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 14 Jul 2025 19:47:29 +0000 Subject: [PATCH 2/5] Minor fix --- .github/workflows/check-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml index ef05f59b81a6f..f5e1ab3d19c5f 100644 --- a/.github/workflows/check-ci.yml +++ b/.github/workflows/check-ci.yml @@ -7,9 +7,11 @@ on: push: paths: - '.ci/**' + - '.github/workflows/check-ci.yml' pull_request: paths: - '.ci/**' + - '.github/workflows/check-ci.yml' jobs: test-python: @@ -29,5 +31,5 @@ jobs: - name: Install Python Dependencies run: pip3 install -r .ci/all_requirements.txt - name: Run Tests - working-direcotry: .ci + working-directory: .ci run: pytest From 680c0256078fc4316ec54f4bafeb31b8bc630535 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 14 Jul 2025 19:48:17 +0000 Subject: [PATCH 3/5] sparse fix --- .github/workflows/check-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml index f5e1ab3d19c5f..2a87889f768d0 100644 --- a/.github/workflows/check-ci.yml +++ b/.github/workflows/check-ci.yml @@ -22,7 +22,7 @@ jobs: - name: Fetch LLVM sources uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 with: - sparse-checkout: .ci/** + sparse-checkout: .ci - name: Setup Python uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 with: From 39e49bd2f5378e3a2d6817d373ece89eac72e07a Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Mon, 14 Jul 2025 19:52:56 +0000 Subject: [PATCH 4/5] fix --- .github/workflows/check-ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml index 2a87889f768d0..f02fcb96b15f3 100644 --- a/.github/workflows/check-ci.yml +++ b/.github/workflows/check-ci.yml @@ -29,7 +29,9 @@ jobs: python-version: 3.13 cache: 'pip' - name: Install Python Dependencies - run: pip3 install -r .ci/all_requirements.txt + run: | + pip3 install -r .ci/all_requirements.txt + pip3 install pytest==8.4.1 - name: Run Tests working-directory: .ci run: pytest From 3875fc6161232092425f250f7d6ee8a8af961863 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Thu, 24 Jul 2025 13:19:56 +0000 Subject: [PATCH 5/5] feedback --- .github/workflows/check-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check-ci.yml b/.github/workflows/check-ci.yml index f02fcb96b15f3..d6212c8a84737 100644 --- a/.github/workflows/check-ci.yml +++ b/.github/workflows/check-ci.yml @@ -1,4 +1,4 @@ -name: Check CI +name: Check CI Scripts permissions: contents: read