Skip to content

Commit

Permalink
Fix github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vinayak-mehta committed Dec 26, 2024
1 parent 3d8e222 commit ad23146
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 30 deletions.
21 changes: 7 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,10 @@ jobs:
with:
python-version: "3.10"

- name: Upgrade pip
- name: Install uv
run: |
pip install --constraint=${PWD}/.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
run: |
pip install --constraint=${PWD}/.github/workflows/constraints.txt poetry
poetry --version
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version
- name: Check if there is a parent commit
id: check-parent-commit
Expand All @@ -41,18 +36,16 @@ jobs:
uses: salsify/[email protected]
with:
version-command: |
bash -o pipefail -c "poetry version | awk '{ print \$2 }'"
bash -o pipefail -c "cat pyproject.toml | grep version | cut -d'\"' -f2"
- name: Bump version for developmental release
if: "! steps.check-version.outputs.tag"
if: steps.check-version.outputs.tag == ''
run: |
poetry version patch &&
version=$(poetry version | awk '{ print $2 }') &&
poetry version $version.dev.$(date +%s)
echo "Version bumping needs to be implemented"
- name: Build package
run: |
poetry build --ansi
python -m build
- name: Publish package on PyPI
if: steps.check-version.outputs.tag
Expand Down
18 changes: 6 additions & 12 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,6 @@ jobs:
posargs:
["camelot", "tests", "docs/conf.py", "--allow-untyped-globals"],
}
# - { python: "3.10", os: "ubuntu-latest", session: "mypy" }
# - { python: "3.9", os: "ubuntu-latest", session: "mypy" }
# - { python: "3.8", os: "ubuntu-latest", session: "mypy" }
# - { python: "3.7", os: "ubuntu-latest", session: "mypy" }
- { python: "3.12", os: "ubuntu-latest", session: "tests" }
- { python: "3.11", os: "ubuntu-latest", session: "tests" }
- { python: "3.10", os: "ubuntu-latest", session: "tests" }
Expand Down Expand Up @@ -65,15 +61,14 @@ jobs:
with open(os.environ["GITHUB_ENV"], mode="a") as io:
print(f"VIRTUALENV_PIP={pip.__version__}", file=io)
- name: Install Poetry
- name: Install uv
run: |
pipx install --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt poetry
poetry --version
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version
- name: Install Nox
run: |
pipx install --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt nox nox-poetry
nox --version
- name: Install ghostscript
Expand Down Expand Up @@ -155,15 +150,14 @@ jobs:
pip install --constraint=${PWD}/.github/workflows/constraints.txt pip
pip --version
- name: Install Poetry
- name: Install uv
run: |
pipx install --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt poetry
poetry --version
curl -LsSf https://astral.sh/uv/install.sh | sh
uv --version
- name: Install Nox
run: |
pipx install --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt nox
pipx inject --pip-args=--constraint=${PWD}/.github/workflows/constraints.txt nox nox-poetry
nox --version
- name: Download coverage data
Expand Down
6 changes: 2 additions & 4 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,8 @@

import nox


try:
from nox_poetry import Session
from nox_poetry import session
from nox_poetry import Session, session
except ImportError:
message = f"""\
Nox failed to import the 'nox-poetry' package.
Expand All @@ -23,7 +21,7 @@
raise SystemExit(dedent(message)) from None

package = "camelot"
python_versions = ["3.10", "3.9", "3.8", "3.11", "3.12"]
python_versions = ["3.8", "3.9", "3.10", "3.11", "3.12"]
nox.needs_version = ">= 2021.6.6"
nox.options.sessions = (
"pre-commit",
Expand Down

0 comments on commit ad23146

Please sign in to comment.