fix(ci): create python venv before installing test and build dependencies
release / test-and-release (push) Failing after 12s

This commit is contained in:
2026-09-07 19:25:23 -07:00
parent d7162ccfae
commit 5e8ef0ee6e
+7 -8
View File
@@ -14,31 +14,30 @@ jobs:
- name: Checkout code - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Set up Python - name: Set up Python venv & dependencies
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install dependencies & build tool
run: | run: |
python3 -m venv .venv
. .venv/bin/activate
pip install --upgrade pip
pip install uv pytest pip install uv pytest
- name: Run unit tests - name: Run unit tests
run: | run: |
. .venv/bin/activate
PYTHONPATH=plugin pytest plugin/tests PYTHONPATH=plugin pytest plugin/tests
- name: Build wheel and sdist - name: Build wheel and sdist
run: | run: |
. .venv/bin/activate
uv build plugin/ uv build plugin/
- name: Publish Gitea Release (on tag or main) - name: Publish Gitea Release
if: startsWith(github.ref, 'refs/tags/v') if: startsWith(github.ref, 'refs/tags/v')
env: env:
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN }} GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN }}
run: | run: |
tag_name="${GITHUB_REF#refs/tags/}" tag_name="${GITHUB_REF#refs/tags/}"
echo "Publishing release for $tag_name" echo "Publishing release for $tag_name"
# Upload via Gitea Release API if curl & jq present
wheel_file=$(ls plugin/dist/*.whl | head -n 1) wheel_file=$(ls plugin/dist/*.whl | head -n 1)
tar_file=$(ls plugin/dist/*.tar.gz | head -n 1) tar_file=$(ls plugin/dist/*.tar.gz | head -n 1)