Add gitea workflow to run offline tests and publish package
Some checks failed
Run Unit Tests / publish (push) Has been cancelled
Some checks failed
Run Unit Tests / publish (push) Has been cancelled
This commit is contained in:
parent
2869b181c6
commit
e8a5b1db7d
41
.gitea/workflows/test-and-publish.yml
Normal file
41
.gitea/workflows/test-and-publish.yml
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Run Unit Tests
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
release:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
# test-package:
|
||||||
|
# strategy:
|
||||||
|
# matrix:
|
||||||
|
# python-version:
|
||||||
|
# - "3.11"
|
||||||
|
# - "3.12"
|
||||||
|
# - "3.13"
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# container: ghcr.io/astral-sh/uv:0.5-python${{ matrix.python-version }}-alpine
|
||||||
|
# steps:
|
||||||
|
# - uses: taiki-e/checkout-action@v1
|
||||||
|
# - name: Install the project
|
||||||
|
# run: uv sync --all-extras --dev
|
||||||
|
# - name: Run tests
|
||||||
|
# run: uv run pytest
|
||||||
|
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container: catthehacker/ubuntu:act-latest
|
||||||
|
env:
|
||||||
|
# workaround for container tool cache path, see https://gitea.com/gitea/act_runner/issues/70
|
||||||
|
RUNNER_TOOL_CACHE: /toolcache
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: actions/setup-python@v4
|
||||||
|
with:
|
||||||
|
python-version: 3.11
|
||||||
|
cache: pip
|
||||||
|
- run: pip install build twine
|
||||||
|
- run: python3 -m build
|
||||||
|
- run: python3 -m twine upload dist/*
|
||||||
|
env:
|
||||||
|
TWINE_REPOSITORY_URL: "${{ gitea.server_url }}/api/packages/${{ gitea.repository_owner }}/pypi"
|
||||||
|
TWINE_USERNAME: "${{ secrets.PACKAGE_REPO_USERNAME }}"
|
||||||
|
TWINE_PASSWORD: "${{ secrets.PACKAGE_REPO_PASSWORD }}"
|
Loading…
x
Reference in New Issue
Block a user