sms-handler/.forgejo/workflows/build.yaml

37 lines
813 B
YAML
Raw Normal View History

2024-12-01 00:53:31 +01:00
on:
push:
workflow_dispatch:
inputs:
verbose:
description: "Verbose"
required: false
default: false
type: boolean
jobs:
test:
runs-on: container
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
2024-12-01 01:24:26 +01:00
- name: Install the latest version of uv
2024-12-01 01:37:05 +01:00
uses: astral-sh/setup-uv@v4
2024-12-01 02:52:07 +01:00
with:
version: "0.5.5"
2024-12-01 01:24:26 +01:00
2024-12-01 00:53:31 +01:00
- name: Install
2024-12-01 01:24:26 +01:00
run: uv sync
2024-12-01 00:53:31 +01:00
- name: Run tests (API call)
2024-12-01 03:02:11 +01:00
run: .venv/bin/pytest -s tests/basic.py
2024-12-02 18:08:30 +01:00
- name: Build wheel
run: uv build --wheel
- name: Publish to home
env:
2024-12-02 18:13:04 +01:00
LOCAL_PYPI_TOKEN: ${{ secrets.LOCAL_PYPI_TOKEN }}
2024-12-02 18:08:30 +01:00
run: uv publish --publish-url https://philo.ydns.eu/code/api/packages/philome/pypi --token $LOCAL_PYPI_TOKEN