Synchronize documentation #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- 'v*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: pre-commit/[email protected] | |
env: | |
RUFF_OUTPUT_FORMAT: github | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
cache: "pip" | |
cache-dependency-path: | | |
pyproject.toml | |
- run: python -m pip install mypy -e .[dev,attentiongrabber,feelinglucky,yaml] | |
- run: mypy --install-types --non-interactive src | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
python-version: ["3.8"] # minimum supported version | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: | | |
pyproject.toml | |
- name: Install dependencies | |
run: python -m pip install -e .[dev,attentiongrabber,feelinglucky,yaml] | |
- run: pytest --cov --cov-report=term-missing --cov-report=xml . | |
env: | |
PYPARSINGENABLEALLWARNINGS: 1 | |
- uses: codecov/codecov-action@v3 | |
publish: | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
needs: | |
- test | |
- lint | |
name: Upload release to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/p/dynamicprompts/ | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- run: python -m pip install hatch | |
- run: hatch build -t wheel | |
- name: Publish package distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
verbose: true | |
print-hash: true |