Skip to content
Closed
Show file tree
Hide file tree
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
48 changes: 48 additions & 0 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: E2E Test

on:
pull_request:
branches: [ main ]
workflow_dispatch:

jobs:
e2e-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
clang_version: [16, 17, 18, 19, 20, 21]
clang_style: [LLVM, Google, Chromium, Mozilla, WebKit]

name: Test clang ${{ matrix.clang_version }} with style ${{ matrix.clang_style }}
steps:
- name: Checkout workflow repo
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
repository: cloudwu/ltask

- name: Set up Python
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c # v6.0.0
with:
python-version: '3.13'

- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install pre-commit

- name: Install pre-commit hooks and run
run: |
rm -f .pre-commit-config.yaml || true
cat > .pre-commit-config.yaml << EOF
repos:
- repo: https://github.com/cpp-linter/cpp-linter-hooks
rev: ${{ github.sha }}
hooks:
- id: clang-format
args: [--style=${{ matrix.clang_style }}, --version=${{ matrix.clang_version }}]
EOF

pre-commit install
pre-commit run -v --all-files
continue-on-error: true
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: pre-commit

on:
push:
branches: main
branches: [main]
pull_request:
branches: main
branches: [main]
workflow_dispatch:

jobs:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

on:
push:
branches: main
branches: [main]
pull_request:
branches: main
branches: [main]
workflow_dispatch:

jobs:
Expand All @@ -15,10 +15,10 @@ jobs:
python-version: ["3.14", "3.13", "3.12", "3.11", "3.10", "3.9"]
steps:
- name: Checkout
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v5
uses: actions/setup-python@e797f83bcb11b83ae66e0230d6156d7c80228e7c #v5.0.0
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -32,7 +32,7 @@ jobs:
coverage run --source=tests,cpp_linter_hooks -m pytest -vv
coverage report
coverage xml
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5
- uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #v5.0.1
if: matrix.python-version == '3.13'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ repos:
- id: check-toml
- id: requirements-txt-fixer
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.13.1
rev: v0.14.2
hooks:
# Run the linter.
- id: ruff-check
Expand Down
Loading