Skip to content
This repository has been archived by the owner on Oct 29, 2024. It is now read-only.

Commit

Permalink
ci: add format check
Browse files Browse the repository at this point in the history
  • Loading branch information
trim21 committed May 22, 2024
1 parent 01fca1b commit 9cbce34
Show file tree
Hide file tree
Showing 5 changed files with 45 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
cache: pip
cache-dependency-path: 'requirements.txt'

- run: pip install -r requirements.txt
- run: pip install -e '.[dev]'

- uses: actions/download-artifact@v4
with:
Expand Down
34 changes: 34 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: tests

on:
pull_request:
workflow_dispatch:
push:
branches:
- master

jobs:
pre-commit:
runs-on: "ubuntu-latest"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: '3.x'
cache: "pip"

- run: pip install -e '.[dev]'

- uses: trim21/actions/pre-commit@master

clang-format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run clang-format style check for C/C++/Protobuf programs.
uses: jidicula/clang-format-action@v4.13.0
with:
check-path: 'src'
3 changes: 1 addition & 2 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ jobs:
with:
python-version: ${{ matrix.python-version }}
cache: "pip"
cache-dependency-path: 'requirements.txt'

- run: pip install -r requirements.txt
- run: pip install -e '.[dev]'

- run: python -m pytest -sv
9 changes: 9 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,14 @@ classifiers = [
"Programming Language :: Python :: 3 :: Only",
]

[project.optional-dependencies]
dev = [
# testing
"pytest==8.2.1",
"pytest-github-actions-annotate-failures==0.2.0",
# build check
"abi3audit",
]

[tool.pytest.ini_options]
pythonpath = ['src']
7 changes: 0 additions & 7 deletions requirements.txt

This file was deleted.

0 comments on commit 9cbce34

Please sign in to comment.