Skip to content

feat: Add e2e.yml test workflow #25

feat: Add e2e.yml test workflow

feat: Add e2e.yml test workflow #25

Workflow file for this run

name: E2E Test
on:
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
target_repo:
description: 'Target repository to test against'
required: false
default: 'llvm/llvm-project'
jobs:
e2e-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
clang_version: ['v19.1.7', 'v20.1.8', 'v21.1.2']
name: Test clang ${{ matrix.clang_version }}
steps:
- name: Checkout workflow repo
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit
- name: Clone target repository
run: |
git clone --depth=1 https://github.com/${{ github.event.inputs.target_repo || 'llvm/llvm-project' }}.git test-repo
- name: Install pre-commit hooks and run
run: |
cd test-repo
rm -f .pre-commit-config.yaml || true
cat > .pre-commit-config.yaml << EOF
repos:
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: ${{ matrix.clang_version }}
hooks:
- id: clang-format
EOF
pre-commit install
pre-commit run -v --all-files