Skip to content

Commit

Permalink
Further hatch migrations
Browse files Browse the repository at this point in the history
Signed-off-by: Cristian Le <[email protected]>
  • Loading branch information
LecrisUT committed Dec 1, 2023
1 parent 389fdca commit 646d6be
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 14 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,18 @@ jobs:
name: Build wheel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
if: ${{ github.event_name == 'release' }}
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
if: ${{ github.event_name == 'workflow_dispatch' }}
- uses: actions/setup-python@v4
with:
python-version: "3.x"
run: python -m pip install hatch
- name: Build package
run: pipx run build
run: hatch build
- uses: actions/upload-artifact@v3
with:
path: dist/*
Expand Down
5 changes: 2 additions & 3 deletions .packit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,12 @@ downstream_package_name: fmf
# F37 works with setuptools_scm 7.0
actions:
create-archive:
- "python3 -m build --sdist --outdir ."
- "sh -c 'echo fmf-$(hatch version).tar.gz'"
- "hatch build -t sdist"
- "sh -c 'echo dist/fmf-*.tar.gz'"
get-current-version:
- "hatch version"

srpm_build_deps:
- python3-build
- hatch
- python3-hatch-vcs

Expand Down
14 changes: 6 additions & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,16 @@ tmp:

# Run the test suite, optionally with coverage
test: tmp
pytest tests/unit
hatch run test:unit
smoke: tmp
pytest tests/unit/test_smoke.py
hatch run test:smoke
coverage: tmp
coverage run --source=fmf -m py.test tests
coverage report
coverage annotate
hatch run cov:coverage


# Build documentation, prepare man page
docs: man
cd docs && make html
hatch run docs:html
man: source
cp docs/header.txt $(TMP)/man.rst
tail -n+7 README.rst >> $(TMP)/man.rst
Expand All @@ -52,9 +50,9 @@ packages: rpm srpm

# Python packaging
wheel:
python3 -m build
hatch build
upload:
twine upload dist/*.whl
hatch publish


# Vim tags and cleanup
Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,11 @@ features = ["tests-cov"]

[tool.hatch.envs.cov.scripts]
xml = ["pytest --cov --cov-report=xml"]
coverage = [
"coverage run -m pytest -vvv -ra --showlocals tests",
"coverage report",
"coverage annotate",
]

[tool.hatch.envs.dev]
description = "Development environment"
Expand Down

0 comments on commit 646d6be

Please sign in to comment.