Skip to content

Commit 6f2c231

Browse files
Ci updates (#7)
* Ci updates * more ci updates * more * Updated build system
1 parent 8348f8f commit 6f2c231

File tree

5 files changed

+183
-276
lines changed

5 files changed

+183
-276
lines changed

.github/workflows/ci.yaml

+32-30
Original file line numberDiff line numberDiff line change
@@ -15,34 +15,32 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
matrix:
18-
os: [ubuntu-20.04, macos-11, windows-2019]
19-
python-version: [ "3.6", "3.7", "3.8", "3.9", "3.10", "pypy3.7", "pypy3.8", "pypy3.9", ]
18+
os: [ubuntu-latest, macos-latest, windows-latest]
19+
python-version: [ "3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "pypy3.8", "pypy3.9", ]
2020
runs-on: ${{ matrix.os }}
2121
steps:
2222
- name: Check out repository
23-
uses: actions/checkout@v3
23+
uses: actions/checkout@v4
2424
- name: Set up python
2525
id: setup-python
26-
uses: actions/setup-python@v4
26+
uses: actions/setup-python@v5
2727
with:
2828
python-version: ${{ matrix.python-version }}
2929
- name: Print Python Information
3030
run: python -VV
31-
- name: Install and configure Poetry
32-
run: |
33-
pip3 install poetry
34-
poetry config virtualenvs.in-project true
31+
- name: Install and configure uv
32+
run: pip3 install uv
3533
- name: Set up cache
36-
uses: syphar/[email protected]
37-
id: cache-virtualenv
34+
uses: actions/cache@v4
35+
id: cached-uv-dependencies
3836
with:
39-
requirement_files: poetry.lock
40-
custom_virtualenv_dir: .venv
37+
path: .venv
38+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
4139
- name: Install dependencies
42-
run: poetry install
43-
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
40+
run: uv sync --all-extras
41+
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
4442
- name: run tests
45-
run: poetry run pytest -vv tests/*
43+
run: uv run pytest -vv tests/*
4644

4745
builder:
4846
needs: [test]
@@ -62,25 +60,28 @@ jobs:
6260
echo "PYTHON_ARCHITECTURE=x64" >> $GITHUB_ENV
6361
fi
6462
- name: Set up python
65-
uses: actions/setup-python@v4
63+
uses: actions/setup-python@v5
6664
with:
6765
python-version: "3.9.x"
6866
architecture: "${{ env.PYTHON_ARCHITECTURE }}"
6967
- name: Print Python Information
7068
run: python -VV
71-
- name: Update dependencies
72-
run: python -m pip install -U pip wheel setuptools twine poetry
69+
- name: Install and configure uv
70+
run: pip3 install uv
7371
- name: Set up cache
74-
uses: syphar/[email protected]
75-
id: cache-virtualenv
72+
uses: actions/cache@v4
73+
id: cached-uv-dependencies
7674
with:
77-
requirement_files: poetry.lock
78-
custom_virtualenv_dir: .venv
75+
path: .venv
76+
key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/uv.lock') }}
7977
- name: Install dependencies
80-
run: poetry install
81-
if: steps.cache-virtualenv.outputs.cache-hit != 'true'
78+
run: uv sync --all-extras
79+
if: steps.cached-uv-dependencies.outputs.cache-hit != 'true'
80+
8281
- name: Build universal source Archive and wheel
83-
run: poetry build
82+
run: uv build
83+
- name: delete all files in dist that is not tar.gz or whl
84+
run: find dist/ -type f ! -name "*.tar.gz" ! -name "*.whl" -delete
8485
- name: Upload artifacts
8586
uses: actions/upload-artifact@v3
8687
with:
@@ -89,11 +90,13 @@ jobs:
8990

9091
publisher_release:
9192
needs: [builder]
92-
if: startsWith(github.event.ref, 'refs/tags/v') && github.ref == 'refs/heads/master'
93+
if: startsWith(github.ref, 'refs/tags/v')
9394
runs-on: ubuntu-latest
95+
permissions:
96+
id-token: write
9497
steps:
9598
- name: Check out repository
96-
uses: actions/checkout@v3
99+
uses: actions/checkout@v4
97100
- name: Download artifacts
98101
uses: actions/download-artifact@v3
99102
with:
@@ -103,16 +106,15 @@ jobs:
103106
uses: pypa/gh-action-pypi-publish@release/v1
104107
with:
105108
verbose: true
106-
user: __token__
107-
password: ${{ secrets.PYPI_API_TOKEN }}
109+
108110

109111
publisher_latest:
110112
needs: [builder]
111113
if: github.ref == 'refs/heads/master'
112114
runs-on: ubuntu-latest
113115
steps:
114116
- name: Check out repository
115-
uses: actions/checkout@v3
117+
uses: actions/checkout@v4
116118
- name: Download artifacts
117119
uses: actions/download-artifact@v3
118120
with:

.python-version

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

poetry.lock

-207
This file was deleted.

0 commit comments

Comments
 (0)