Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 10 additions & 12 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,23 +14,21 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4

- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: '3.10'

enable-cache: true

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
poetry install

run: uv sync --locked

- name: Build documentation
run: poetry run mkdocs build
run: uv run mkdocs build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
publish_dir: ./site
37 changes: 14 additions & 23 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,41 +12,32 @@ jobs:
python-version: [3.9]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2

- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
python-version: ${{ matrix.python-version }}

- name: Install poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python - --version 1.2.2
echo "${HOME}/.local/bin" >> $GITHUB_PATH
enable-cache: true

- name: Install dependencies
run: |
poetry install --no-root
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run pytest

- name: Build wheels
run: |
poetry version $(git tag --points-at HEAD)
poetry build
uv version "$(git tag --points-at HEAD)"
uv build

- name: Test install package
run: |
poetry new test-install
cd test-install
poetry add ../dist/$(ls ../dist/*.whl)

poetry run python -c "import datastream"
uv venv /tmp/test-install
uv pip install --python /tmp/test-install ./dist/*.whl
/tmp/test-install/bin/python -c "import datastream"

- name: Upload
env:
USERNAME: __token__
PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
poetry publish --username=$USERNAME --password=$PASSWORD
UV_PUBLISH_USERNAME: __token__
UV_PUBLISH_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: uv publish
30 changes: 7 additions & 23 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,34 +10,18 @@ jobs:
python-version: [3.9, "3.10"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Cache pip
uses: actions/cache@v2
- name: Install uv
uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('pyproject.toml') }}-${{ hashFiles('poetry.lock') }}-${ GITHUB_REF }
restore-keys: |
${{ runner.os }}-pip-
${{ runner.os }}-

- name: Install poetry
run: |
python -m pip install --upgrade pip
curl -sSL https://install.python-poetry.org | python - --version 1.2.2
echo "${HOME}/.local/bin" >> $GITHUB_PATH
python-version: ${{ matrix.python-version }}
enable-cache: true

- name: Install dependencies
run: |
poetry install
run: uv sync --locked

- name: Run tests
run: |
poetry run pytest
run: uv run pytest

- name: Build wheels
run: |
poetry build
run: uv build
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.10
Loading
Loading