Skip to content

Commit

Permalink
♻️ Refactor CI workflow and dependency management; unify optional dep…
Browse files Browse the repository at this point in the history
…endencies under 'all' and 'extra'
  • Loading branch information
yezz123 committed Nov 24, 2024
1 parent 1bd2075 commit 52bef7d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 50 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ jobs:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.12']

steps:
- uses: actions/checkout@v4

Expand All @@ -27,7 +24,7 @@ jobs:
enable-cache: true

- name: Install dependencies
run: uv sync --python ${{ matrix.python-version }} --group lint --all-extras
run: uv sync --python 3.12 --group lint --all-extras

- uses: pre-commit/[email protected]
with:
Expand All @@ -54,9 +51,6 @@ jobs:
with:
enable-cache: true

- name: Install extra dependencies
run: uv sync --group dev --all-extras

- name: Make coverage directory
run: mkdir coverage

Expand Down Expand Up @@ -103,7 +97,6 @@ jobs:
jobs: ${{ toJSON(needs) }}

release:
name: Deploy
needs: [check]
if: "success() && startsWith(github.ref, 'refs/tags/')"
runs-on: ubuntu-latest
Expand Down
5 changes: 2 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ dependencies = ['pydantic>=2.5.2','typing-extensions']
dynamic = ['version']

[project.optional-dependencies]
extra = [
all = [
'phonenumbers>=8,<9',
'pycountry>=23',
'semver>=3.0.2',
Expand All @@ -69,15 +69,14 @@ dev = [
"pytest-pretty>=1.2.0",
"dirty-equals>=0.7.1",
"pytest>=8.3.2",
"pytest-cov>=5.0.0",
]
lint = [
"ruff>=0.7.4",
"mypy>=0.910",
"annotated-types>=0.7.0",
"types-pytz>=2024.1.0.20240417",
]
all = [
extra = [
{ include-group = 'dev' },
{ include-group = 'lint' },
]
Expand Down
61 changes: 22 additions & 39 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52bef7d

Please sign in to comment.