Skip to content

Commit

Permalink
ruff workflow (#7)
Browse files Browse the repository at this point in the history
ruff workflow
  • Loading branch information
0x00b1 authored Apr 4, 2024
1 parent b37d195 commit 626ee95
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 20 deletions.
47 changes: 27 additions & 20 deletions .github/workflows/publish.yml → .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,25 +14,7 @@ jobs:
with:
name: "python-package-distributions"
path: "dist/"
test:
environment:
name: "test.pypi.org"
url: "https://test.pypi.org/project/beignet"
needs:
- "build"
permissions:
id-token: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/download-artifact@v3"
with:
name: "python-package-distributions"
path: "dist/"
- uses: "pypa/gh-action-pypi-publish@release/v1"
with:
repository-url: "https://test.pypi.org/legacy/"
skip-existing: true
publish:
pypi:
environment:
name: "pypi.org"
url: "https://pypi.org/project/beignet"
Expand All @@ -50,7 +32,7 @@ jobs:
- uses: "pypa/gh-action-pypi-publish@release/v1"
release:
needs:
- "publish"
- "pypi"
permissions:
contents: "write"
id-token: "write"
Expand All @@ -69,4 +51,29 @@ jobs:
- env:
GITHUB_TOKEN: "${{ github.token }}"
run: "gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}'"
ruff:
runs-on: "ubuntu-latest"
steps:
- uses: "actions/checkout@v4"
- uses: "chartboost/ruff-action@v1"
with:
args: "format --check"
test-pypi:
environment:
name: "test.pypi.org"
url: "https://test.pypi.org/project/beignet"
needs:
- "build"
permissions:
id-token: "write"
runs-on: "ubuntu-latest"
steps:
- uses: "actions/download-artifact@v3"
with:
name: "python-package-distributions"
path: "dist/"
- uses: "pypa/gh-action-pypi-publish@release/v1"
with:
repository-url: "https://test.pypi.org/legacy/"
skip-existing: true
on: "push"
3 changes: 3 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,8 @@ name = "beignet"
readme = "README.md"
requires-python = ">=3.10"

[tool.ruff.format]
docstring-code-format = true

[tool.setuptools_scm]
local_scheme = "no-local-version"

0 comments on commit 626ee95

Please sign in to comment.