fix(ci): create python venv before installing test and build dependencies
release / test-and-release (push) Failing after 12s
release / test-and-release (push) Failing after 12s
This commit is contained in:
@@ -14,31 +14,30 @@ jobs:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install dependencies & build tool
|
||||
- name: Set up Python venv & dependencies
|
||||
run: |
|
||||
python3 -m venv .venv
|
||||
. .venv/bin/activate
|
||||
pip install --upgrade pip
|
||||
pip install uv pytest
|
||||
|
||||
- name: Run unit tests
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
PYTHONPATH=plugin pytest plugin/tests
|
||||
|
||||
- name: Build wheel and sdist
|
||||
run: |
|
||||
. .venv/bin/activate
|
||||
uv build plugin/
|
||||
|
||||
- name: Publish Gitea Release (on tag or main)
|
||||
- name: Publish Gitea Release
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
env:
|
||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
tag_name="${GITHUB_REF#refs/tags/}"
|
||||
echo "Publishing release for $tag_name"
|
||||
# Upload via Gitea Release API if curl & jq present
|
||||
wheel_file=$(ls plugin/dist/*.whl | head -n 1)
|
||||
tar_file=$(ls plugin/dist/*.tar.gz | head -n 1)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user