Add clang-format action, extend gitignore #18
Workflow file for this run
This file contains 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
name: Lint | |
on: [push, pull_request] | |
jobs: | |
py-check-ruff: | |
name: Lint with ruff | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize a repository | |
uses: actions/checkout@v4 | |
- name: Setup environment | |
run: | | |
python3 -m pip install ruff==0.1.3 | |
- name: Run ruff | |
run: | | |
python3 -m ruff check . | |
py-check-yapf: | |
name: Check formatting with yapf | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize a repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Setup environment | |
run: | | |
python3 -m pip install git+https://github.com/google/yapf@be72557 | |
- name: Run yapf | |
run: | | |
python3 -m yapf -rdp . | |
- name: Check for difference | |
run: | | |
git diff --exit-code | |
cpp-clang-format: | |
name: Check formatting with clang-format | |
runs-on: ubuntu-latest | |
steps: | |
- name: Initialize a repository | |
uses: actions/checkout@v4 | |
- name: Run clang-format | |
uses: DoozyX/clang-format-lint-action@v0.17 | |
with: | |
source: 'include lib python' | |
clangFormatVersion: 17 |