Skip to content

Commit 2bebd66

Browse files
Merge pull request #72 from DiamondLightSource/ci_fixes
CI fixes including: - Remove coverage due to issue #73 - Remove testing on Python3.7, ahead of complete removal soon - Add Python3.12 support
2 parents 4f88c34 + 468e617 commit 2bebd66

File tree

3 files changed

+18
-15
lines changed

3 files changed

+18
-15
lines changed

.github/actions/install_requirements/action.yml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,16 +29,16 @@ runs:
2929

3030
- name: Create lockfile
3131
run: |
32-
mkdir -p lockfiles
33-
pip freeze --exclude-editable > lockfiles/${{ inputs.requirements_file }}
32+
mkdir -p lockfiles-${{ inputs.python_version }}
33+
pip freeze --exclude-editable > lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}
3434
# delete the self referencing line and make sure it isn't blank
35-
sed -i'' -e '/file:/d' lockfiles/${{ inputs.requirements_file }}
35+
sed -i'' -e '/file:/d' lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}
3636
shell: bash
3737

3838
- name: Upload lockfiles
39-
uses: actions/upload-artifact@v3
39+
uses: actions/upload-artifact@v4
4040
with:
41-
name: lockfiles
41+
name: lockfiles-${{ inputs.python_version }}
4242
path: lockfiles
4343

4444
# This eliminates the class of problems where the requirements being given no
@@ -49,10 +49,9 @@ runs:
4949
- name: If requirements file exists, check it matches pip installed packages
5050
run: |
5151
if [ -s ${{ inputs.requirements_file }} ]; then
52-
if ! diff -u ${{ inputs.requirements_file }} lockfiles/${{ inputs.requirements_file }}; then
52+
if ! diff -u ${{ inputs.requirements_file }} lockfiles-${{ inputs.python_version }}/${{ inputs.requirements_file }}; then
5353
echo "Error: ${{ inputs.requirements_file }} need the above changes to be exhaustive"
5454
exit 1
5555
fi
5656
fi
5757
shell: bash
58-

.github/workflows/code.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,17 @@ jobs:
1111
fail-fast: false
1212
matrix:
1313
os: ["ubuntu-latest"] # can add windows-latest, macos-latest
14-
python: ["3.8", "3.9", "3.10", "3.11"]
14+
python: ["3.9", "3.10", "3.11", "3.12"]
1515
install: ["-e .[dev]"]
1616
# Make one version be non-editable to test both paths of version code
1717
include:
1818
- os: "ubuntu-latest"
19-
python: "3.7"
19+
python: "3.8"
2020
install: ".[dev]"
2121

2222
runs-on: ${{ matrix.os }}
2323
container:
24-
image: ghcr.io/epics-containers/epics-base-linux-developer:23.6.1
24+
image: ghcr.io/epics-containers/epics-base-developer:7.0.9ec3
2525
volumes:
2626
- /opt/hostedtoolcache:/opt/hostedtoolcache
2727

@@ -86,9 +86,9 @@ jobs:
8686
CIBW_SKIP: pp* *i686*
8787

8888
- name: Upload sdist and wheels as artifacts
89-
uses: actions/upload-artifact@v3
89+
uses: actions/upload-artifact@v4
9090
with:
91-
name: dist
91+
name: dist-${{ matrix.os }}-${{ matrix.python }}
9292
path: dist
9393

9494
- name: Check for packaging errors
@@ -104,7 +104,11 @@ jobs:
104104
HAS_PYPI_TOKEN: ${{ secrets.PYPI_TOKEN != '' }}
105105

106106
steps:
107-
- uses: actions/download-artifact@v3
107+
- uses: actions/download-artifact@v4
108+
with:
109+
pattern: dist*
110+
path: dist
111+
merge-multiple: true
108112

109113
- name: Fixup blank lockfiles
110114
# Github release artifacts can't be blank

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ classifiers = [
1616
"Programming Language :: Python :: 3.9",
1717
"Programming Language :: Python :: 3.10",
1818
"Programming Language :: Python :: 3.11",
19+
"Programming Language :: Python :: 3.12",
1920
"License :: OSI Approved :: GNU General Public License v2 or later (GPLv2+)",
2021
]
2122
description = "Build tools using cooperative threading"
@@ -33,7 +34,6 @@ dev = [
3334
"pre-commit",
3435
"pydata-sphinx-theme>=0.12",
3536
"pytest",
36-
"pytest-cov",
3737
"sphinx-autobuild",
3838
"sphinx-copybutton",
3939
"sphinx-design",
@@ -106,7 +106,7 @@ allowlist_externals =
106106
sphinx-build
107107
sphinx-autobuild
108108
commands =
109-
pytest: pytest --cov=cothread --cov-report term --cov-report xml:cov.xml {posargs}
109+
pytest: pytest {posargs}
110110
pre-commit: pre-commit run --all-files {posargs}
111111
docs: sphinx-{posargs:build -EW --keep-going} -T docs build/html
112112
"""

0 commit comments

Comments
 (0)