Skip to content

Commit

Permalink
chore: Add CI job for black and config in pyproject
Browse files Browse the repository at this point in the history
  • Loading branch information
lperdereau committed Dec 3, 2024
1 parent 0d39243 commit a995a23
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 1 deletion.
29 changes: 29 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Run tests

on: [push]

jobs:
# Run tests for code formating
black:
runs-on: ubuntu-latest
concurrency: tests
environment: tests
permissions:
id-token: write
contents: write

steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install black
- name: Build package
run: python -m black .
1 change: 0 additions & 1 deletion dev-requirements.txt

This file was deleted.

13 changes: 13 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,16 @@ env = "GH_TOKEN"
[tool.semantic_release.publish]
dist_glob_patterns = ["dist/*"]
upload_to_vcs_release = true

[tool.black]
line-length = 120
exclude = '''
/(
.git
.tox
.nox
.venv
build
dist
)/
'''

0 comments on commit a995a23

Please sign in to comment.