Skip to content

Commit 675d7e1

Browse files
[CI][Github] Add Workflow to Run Python Tests in CI Folder (llvm#148696)
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.
1 parent 1c3e4e9 commit 675d7e1

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

.github/workflows/check-ci.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Check CI Scripts
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
push:
8+
paths:
9+
- '.ci/**'
10+
- '.github/workflows/check-ci.yml'
11+
pull_request:
12+
paths:
13+
- '.ci/**'
14+
- '.github/workflows/check-ci.yml'
15+
16+
jobs:
17+
test-python:
18+
name: "Check Python Tests"
19+
runs-on: ubuntu-24.04
20+
if: github.repository == 'llvm/llvm-project'
21+
steps:
22+
- name: Fetch LLVM sources
23+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
24+
with:
25+
sparse-checkout: .ci
26+
- name: Setup Python
27+
uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0
28+
with:
29+
python-version: 3.13
30+
cache: 'pip'
31+
- name: Install Python Dependencies
32+
run: |
33+
pip3 install -r .ci/all_requirements.txt
34+
pip3 install pytest==8.4.1
35+
- name: Run Tests
36+
working-directory: .ci
37+
run: pytest

0 commit comments

Comments
 (0)