48484949 - name : Run cargo test
5050 run : cargo test --locked
51- pure-python -linting :
51+ poetry -linting :
5252 strategy :
5353 fail-fast : false
5454 matrix :
@@ -61,38 +61,21 @@ jobs:
6161 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
6262 - name : Cache Rust dependencies
636364- - name : Set up Python
65- uses : actions/setup-python@v4
66- with :
67- python-version : " ${{ env.MIN_PYTHON_VERSION }}"
68- - name : Get full Python version
69- id : full-python-version
70- run : echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT
7164 - name : Install Poetry
72- run : |
73- pip install -U pip
74- pip install pipx
75- pipx install poetry
65+ run : pipx install poetry
7666 - name : Configure poetry
7767 run : |
7868 poetry config virtualenvs.create true
7969 poetry config virtualenvs.in-project true
70+ - name : Set up Python
71+ uses : actions/setup-python@v4
72+ with :
73+ python-version : " ${{ env.MIN_PYTHON_VERSION }}"
8074 - name : Build package
8175 run : cargo build --release
8276 - name : Run creation
8377 run : |
8478 ./scripts/ci_run.sh ${{ matrix.project_type }} 1
85- - name : Cache poetry venv
86- uses : actions/cache@v3
87- id : poetry-cache
88- with :
89- path : my-project/.venv
90- key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
91- - name : Ensure cache is healthy
92- working-directory : ${{ env.WORKING_DIR }}
93- if : steps.poetry-cache.outputs.cache-hit == 'true'
94- shell : bash
95- run : timeout 10s poetry run pip --version || rm -rf .venv
9679 - name : Install Dependencies
9780 working-directory : ${{ env.WORKING_DIR }}
9881 run : poetry install
10285 - name : ruff
10386 working-directory : ${{ env.WORKING_DIR }}
10487 run : poetry run ruff check .
105- pure-python -test :
88+ poetry -test :
10689 strategy :
10790 fail-fast : false
10891 matrix :
@@ -116,38 +99,21 @@ jobs:
11699 curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
117100 - name : Cache Rust dependencies
118101119- - name : Set up Python
120- uses : actions/setup-python@v4
121- with :
122- python-version : " 3.11"
123- - name : Get full Python version
124- id : full-python-version
125- run : echo version=$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") >> $GITHUB_OUTPUT
126102 - name : Install Poetry
127- run : |
128- pip install -U pip
129- pip install pipx
130- pipx install poetry
103+ run : pipx install poetry
131104 - name : Configure poetry
132105 run : |
133106 poetry config virtualenvs.create true
134107 poetry config virtualenvs.in-project true
108+ - name : Set up Python
109+ uses : actions/setup-python@v4
110+ with :
111+ python-version : " 3.11"
135112 - name : Build package
136113 run : cargo build --release
137114 - name : Run creation
138115 run : |
139116 ./scripts/ci_run.sh ${{ matrix.project_type }} 1
140- - name : Cache poetry venv
141- uses : actions/cache@v3
142- id : poetry-cache
143- with :
144- path : my-project/.venv
145- key : venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
146- - name : Ensure cache is healthy
147- working-directory : ${{ env.WORKING_DIR }}
148- if : steps.poetry-cache.outputs.cache-hit == 'true'
149- shell : bash
150- run : timeout 10s poetry run pip --version || rm -rf .venv
151117 - name : Install Dependencies
152118 working-directory : ${{ env.WORKING_DIR }}
153119 run : poetry install
@@ -183,11 +149,11 @@ jobs:
183149 - name : Install Dependencies
184150 working-directory : ${{ env.WORKING_DIR }}
185151 run : |
186- pip install -U pip
187- pip install -r requirements-dev.txt
188- pip install -e .
152+ python -m pip install -U pip
153+ python -m pip install -r requirements-dev.txt
154+ python -m pip install -e .
189155 maturin build --out dist
190- pip install --no-index --find-links=dist/ my-project
156+ python -m pip install --no-index --find-links=dist/ my-project
191157 - name : MyPy
192158 working-directory : ${{ env.WORKING_DIR }}
193159 run : just mypy
@@ -225,11 +191,78 @@ jobs:
225191 - name : Install Dependencies
226192 working-directory : ${{ env.WORKING_DIR }}
227193 run : |
228- pip install -U pip
229- pip install -r requirements-dev.txt
230- pip install -e .
194+ python -m pip install -U pip
195+ python -m pip install -r requirements-dev.txt
196+ python -m pip install -e .
231197 maturin build --out dist
232- pip install --no-index --find-links=dist/ my-project
198+ python -m pip install --no-index --find-links=dist/ my-project
199+ - name : Pre-commit install
200+ working-directory : ${{ env.WORKING_DIR }}
201+ run : pre-commit install
202+ - name : Test with pytest
203+ working-directory : ${{ env.WORKING_DIR }}
204+ run : pytest
205+ setuptools-linting :
206+ strategy :
207+ fail-fast : false
208+ matrix :
209+ project_type : ["application", "lib"]
210+ runs-on : ubuntu-latest
211+ steps :
212+ - uses : actions/checkout@v4
213+ - name : Install Rust
214+ run : |
215+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
216+ - name : Cache Rust dependencies
217+ 218+ - name : Set up Python
219+ uses : actions/setup-python@v4
220+ with :
221+ python-version : " ${{ env.MIN_PYTHON_VERSION }}"
222+ - name : Build package
223+ run : cargo build --release
224+ - name : Run creation
225+ run : |
226+ ./scripts/ci_run.sh ${{ matrix.project_type }} 3
227+ - name : Install Dependencies
228+ working-directory : ${{ env.WORKING_DIR }}
229+ run : |
230+ python -m pip install -U pip
231+ python -m pip install -r requirements-dev.txt
232+ - name : MyPy
233+ working-directory : ${{ env.WORKING_DIR }}
234+ run : mypy .
235+ - name : ruff
236+ working-directory : ${{ env.WORKING_DIR }}
237+ run : ruff check .
238+ setuptools-test :
239+ strategy :
240+ fail-fast : false
241+ matrix :
242+ project_type : ["application", "lib"]
243+ os : [ubuntu-latest, macos-latest]
244+ runs-on : ${{ matrix.os }}
245+ steps :
246+ - uses : actions/checkout@v4
247+ - name : Install Rust
248+ run : |
249+ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
250+ - name : Cache Rust dependencies
251+ 252+ - name : Set up Python
253+ uses : actions/setup-python@v4
254+ with :
255+ python-version : " 3.11"
256+ - name : Build package
257+ run : cargo build --release
258+ - name : Run creation
259+ run : |
260+ ./scripts/ci_run.sh ${{ matrix.project_type }} 3
261+ - name : Install Dependencies
262+ working-directory : ${{ env.WORKING_DIR }}
263+ run : |
264+ python -m pip install -U pip
265+ python -m pip install -r requirements-dev.txt
233266 - name : Pre-commit install
234267 working-directory : ${{ env.WORKING_DIR }}
235268 run : pre-commit install
0 commit comments