Skip to content

feat: add e2e.yml #83

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 22 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
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: [16, 17, 18, 19, 20]

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: Create .pre-commit-config.yaml
run: |
cd test-repo
rm -f .pre-commit-config.yaml
cat > .pre-commit-config.yaml << EOF
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: main
hooks:
- id: clang-format
args: [
--style=LLVM,
--version=${{ matrix.clang_version }}
]
EOF

- name: Install and run cpp-linter-hooks
run: |
cd test-repo
pre-commit install
pre-commit run --all-files
Loading