rm windows tests, who uses windows anyway #170
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- hatchling/uv | |
tags: | |
- 'v*' | |
pull_request: {} | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
- name: Install dependencies | |
run: | | |
uv venv .venv | |
source .venv/bin/activate | |
uv pip install -r ./requirements-dev.txt | |
- name: Lint | |
run: | | |
source .venv/bin/activate | |
ruff recon tests docs/src | |
black recon tests docs/src --check | |
- name: Pyright | |
run: | | |
source .venv/bin/activate | |
pyright | |
test: | |
name: test py${{ matrix.python }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: '3.9' | |
os: macos-latest | |
- python: '3.10' | |
os: ubuntu-latest | |
- python: '3.11' | |
os: ubuntu-latest | |
- python: '3.11' | |
os: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Install dependencies | |
run: | | |
uv venv .venv | |
source .venv/bin/activate | |
uv pip install -r ./requirements-dev.txt | |
- name: test | |
run: | | |
source .venv/bin/activate | |
pytest tests -n 2 | |
deploy: | |
needs: test | |
if: "success() && startsWith(github.ref, 'refs/tags/')" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install twine | |
run: pipx install twine | |
- name: Set up python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.11' | |
cache: 'poetry' | |
- name: Build | |
run: | | |
poetry build | |
- name: Publish | |
run: | | |
poetry publish | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.POETRY_PYPI_TOKEN_PYPI }} |