Skip to content

Commit

Permalink
ci: 3.13 and some touchup
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Oct 7, 2024
1 parent c980d61 commit d7705a9
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 42 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI

on:
workflow_dispatch:
release:
types:
- published

concurrency:
group: ${ github.workflow }-${ github.ref }
cancel-in-progress: true

jobs:
dist:
name: Distribution build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2


publish:
name: Publish
environment: pypi
permissions:
id-token: write
attestations: write
needs: [dist]
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v4
with:
path: dist
name: Packages

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/uproot_browser-*"

- uses: pypa/gh-action-pypi-publish@release/v1
with:
attestations: true
44 changes: 7 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,21 @@ jobs:
matrix:
python-version: ["3.8", "3.11"]
runs-on: [ubuntu-latest, macos-13, windows-latest]

include:
- python-version: "3.13"
runs-on: ubuntu-latest
- python-version: "3.13"
runs-on: macos-latest
- python-version: pypy-3.10
runs-on: ubuntu-latest


steps:
- uses: actions/checkout@v4

- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true

- uses: astral-sh/setup-uv@v3

Expand All @@ -57,48 +60,15 @@ jobs:
run: nox -s tests

- name: Test minimum versions
if: matrix.python-version != 'pypy-3.10'
if: matrix.python-version != 'pypy-3.10' || matrix.python-version != '3.13'
run: nox -s minimums

pass:
if: always()
needs: [checks]
needs: [pre-commit, checks]
runs-on: ubuntu-latest
steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}

dist:
name: Distribution build
runs-on: ubuntu-latest
needs: [pre-commit]

steps:
- uses: actions/checkout@v4
- uses: hynek/build-and-inspect-python-package@v2


publish:
name: Publish
environment: pypi
permissions:
id-token: write
attestations: write
needs: [dist]
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v4
with:
path: dist
name: Packages

- name: Generate artifact attestation for sdist and wheel
uses: actions/attest-build-provenance@v1
with:
subject-path: "dist/uproot_browser-*"

- uses: pypa/gh-action-pypi-publish@release/v1
17 changes: 12 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Development Status :: 4 - Beta",
"Typing :: Typed",
]
Expand All @@ -53,8 +54,8 @@ dependencies = [
[project.optional-dependencies]
test = [
"pytest >=8",
"pytest-asyncio >=0.22",
"scikit-hep-testdata>=0.4.10",
"pytest-asyncio >=0.24",
"scikit-hep-testdata >=0.4.10",
]
iterm = [
"matplotlib",
Expand All @@ -79,6 +80,14 @@ uproot-browser = "uproot_browser.__main__:main"
version.source = "vcs"
build.hooks.vcs.version-file = "src/uproot_browser/_version.py"

[tool.uv]
environments = [
"python_version >= '3.10'",
]
dev-dependencies = [
"uproot-browser[test]",
]

[tool.pytest.ini_options]
minversion = "6.0"
addopts = ["-ra", "--showlocals", "--strict-markers", "--strict-config"]
Expand All @@ -92,14 +101,14 @@ filterwarnings = [
log_cli_level = "info"
testpaths = ["tests"]
asyncio_mode = "auto"
asyncio_default_fixture_loop_scope = "function"


[tool.mypy]
files = "src"
python_version = "3.8"
warn_unused_configs = true
strict = true
show_error_codes = true

[[tool.mypy.overrides]]
module = ["plotext.*", "awkward.*", "uproot.*", "matplotlib.*"]
Expand Down Expand Up @@ -127,8 +136,6 @@ messages_control.disable = [
"wrong-import-position", # Handled by Ruff
]

[tool.ruff]
src = ["src"]

[tool.ruff.lint]
extend-select = [
Expand Down

0 comments on commit d7705a9

Please sign in to comment.