mirror of
https://github.com/intel/llvm.git
synced 2026-01-22 23:49:22 +08:00
[CI][Github] Add Workflow to Run Python Tests in CI Folder (#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.
This commit is contained in:
37
.github/workflows/check-ci.yml
vendored
Normal file
37
.github/workflows/check-ci.yml
vendored
Normal file
@@ -0,0 +1,37 @@
|
||||
name: Check CI Scripts
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user