-
Notifications
You must be signed in to change notification settings - Fork 3
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
shenxianpeng
wants to merge
15
commits into
main
Choose a base branch
from
add-workflow-to-test-cpython
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
70a5959
feat: add e2e.yml
shenxianpeng 3b4fee3
chore: bump version to v0.8.3
shenxianpeng e0f4b6d
chore: bump version to v0.8.3
shenxianpeng fb063a7
revert change of readme
shenxianpeng a855e93
update pre-commit-config.yml
shenxianpeng adcb858
update pre-commit-config.yml
shenxianpeng b55bff2
Merge branch 'main' into add-workflow-to-test-cpython
shenxianpeng 1a8ab5c
Merge branch 'main' into add-workflow-to-test-cpython
shenxianpeng 6827c72
update e2e.yml
shenxianpeng a8f64d9
updare rev to main branch
shenxianpeng f966317
Merge branch 'main' into add-workflow-to-test-cpython
shenxianpeng aaf2d2e
Merge branch 'main' into add-workflow-to-test-cpython
shenxianpeng 1f44868
update setup-python to v5
shenxianpeng 46af185
chagne to llvm-project
shenxianpeng a599c9f
change to other hooks for testing
shenxianpeng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
name: E2E Test | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
workflow_dispatch: | ||
inputs: | ||
target_repo: | ||
description: 'Target repository to test against' | ||
required: false | ||
default: 'llvm/llvm-project' | ||
clang_version: | ||
description: 'Clang version to use' | ||
required: false | ||
default: '20' | ||
style: | ||
description: 'Clang-format style' | ||
required: false | ||
default: 'file' | ||
|
||
jobs: | ||
e2e-test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: '3.13' | ||
|
||
- name: Install 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: Replace pre-commit configuration | ||
run: | | ||
cd test-repo | ||
rm -f .pre-commit-config.yaml | ||
cat > .pre-commit-config.yaml << 'EOF' | ||
repos: | ||
- repo: https://github.com/pre-commit/mirrors-clang-format | ||
rev: v20.1.7 | ||
hooks: | ||
- id: clang-format | ||
EOF | ||
# cat > .pre-commit-config.yaml << 'EOF' | ||
# repos: | ||
# - repo: https://github.com/cpp-linter/cpp-linter-hooks | ||
# rev: main | ||
# hooks: | ||
# - id: clang-format | ||
# args: [--style=${{ github.event.inputs.style || 'Google' }}, --version=${{ github.event.inputs.clang_version || '20' }}] | ||
# EOF | ||
|
||
- name: Install and run hook | ||
run: | | ||
cd test-repo | ||
pre-commit install | ||
pre-commit run --all-files |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Install the required
clang-format
binaryThe workflow relies on
clang-format
(potentially version 20) being present on the runner, but nothing installs it. Without the binary every run will fail. Add an explicit install step before running pre-commit.📝 Committable suggestion
🤖 Prompt for AI Agents