Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: LibraryOfCongress/tests-bagit-python

permissions: {}

on:
workflow_dispatch:

jobs:
test:
name: Tests (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
permissions:
contents: read

strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.8"

- name: Run tests with coverage
run: uv run pytest --cov
26 changes: 0 additions & 26 deletions .github/workflows/coveralls.yml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/pypi-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,12 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6

- name: Build sdist
run: pipx run build --sdist

- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
path: dist/*.tar.gz

Expand All @@ -31,11 +31,12 @@ jobs:
name: pypi
url: https://pypi.org/p/bagit
steps:
- uses: actions/download-artifact@v4
- uses: actions/download-artifact@v8
with:
# unpacks default artifact into dist/
# if `name: artifact` is omitted, the action will create extra parent dir
name: artifact
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
17 changes: 12 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,13 @@ jobs:
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- run: pip install --user ruff
- run: ruff check --output-format=github

test:
name: Tests (Python ${{ matrix.python-version }})
needs: ruff
permissions:
contents: read
Expand All @@ -26,14 +28,19 @@ jobs:
fail-fast: false
matrix:
python-version:
["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v6

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install uv
uses: astral-sh/setup-uv@v5
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
with:
version: "0.11.8"

- name: Run tests
run: uv run pytest
3 changes: 2 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ addopts = "-v"

[tool.coverage.run]
branch = true
include = "src"
include = ["src/*"]

[tool.hatch.version]
source = "vcs"
Expand All @@ -61,5 +61,6 @@ include = [
dev = [
"coverage>=7.8.2",
"pytest>=8.4.0",
"pytest-cov>=7.1.0",
"ruff>=0.11.12",
]