diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..972343e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,27 @@ +name: Run tests + +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 . diff --git a/dev-requirements.txt b/dev-requirements.txt deleted file mode 100644 index 7e66a17..0000000 --- a/dev-requirements.txt +++ /dev/null @@ -1 +0,0 @@ -black diff --git a/pyproject.toml b/pyproject.toml index 1c2eb0f..61ab68e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 +)/ +'''