Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pyproject, ci: use recursive extras (#179)
Browse files Browse the repository at this point in the history
Should speed up the CI slightly.

Signed-off-by: William Woodruff <[email protected]>

Co-authored-by: Alex Cameron <[email protected]>
woodruffw and tetsuo-cpp committed Aug 2, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
1 parent db3e757 commit 96117c7
Showing 3 changed files with 20 additions and 11 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,7 @@ jobs:
with:
python-version: ${{ matrix.python }}
- name: deps
run: make dev
run: make dev SIGSTORE_EXTRA=test
- name: test
run: make test
- name: test (offline)
@@ -49,7 +49,7 @@ jobs:
- uses: actions/checkout@d171c3b028d844f2bf14e9fdec0c58114451e4bf
- uses: actions/setup-python@7f80679172b057fc5e90d70d197929d454754a5a
- name: deps
run: make dev
run: make dev SIGSTORE_EXTRA=lint
- name: lint
run: make lint

6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -9,6 +9,10 @@ BUMP_ARGS :=
# Optionally overridden by the user in the `test` target.
TESTS :=

# Optionally overridden by the user/CI, to limit the installation to a specific
# subset of development dependencies.
SIGSTORE_EXTRA := dev

# If the user selects a specific test pattern to run, set `pytest` to fail fast
# and only run tests that match the pattern.
# Otherwise, run all tests and enable coverage assertions, since we expect
@@ -31,7 +35,7 @@ env/pyvenv.cfg: pyproject.toml
rm -rf env
python3 -m venv env
./env/bin/python -m pip install --upgrade pip
./env/bin/python -m pip install -e .[dev]
./env/bin/python -m pip install -e .[$(SIGSTORE_EXTRA)]

.PHONY: dev
dev: env/pyvenv.cfg
21 changes: 13 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -46,25 +46,30 @@ Issues = "https://github.com/sigstore/sigstore-python/issues"
Source = "https://github.com/sigstore/sigstore-python"

[project.optional-dependencies]
dev = [
"bandit",
"build",
"bump",
"flake8",
"black",
"isort",
test = [
"pytest",
"pytest-cov",
"pretend",
"coverage[toml]",
]
lint = [
"bandit",
"flake8",
"black",
"isort",
"interrogate",
"pdoc3",
"mypy",
"types-cryptography",
"types-requests",
"types-pyOpenSSL",
"types-pyjwt",
]
dev = [
"build",
"bump>=1.3.2",
"pdoc3",
"sigstore[test,lint]",
]

[tool.isort]
multi_line_output = 3

0 comments on commit 96117c7

Please sign in to comment.