refactor(api): rename async iterators to stream_* and update examples… #429
Workflow file for this run
This file contains hidden or 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
| on: | |
| push: | |
| schedule: | |
| - cron: '0 3 * * 6' | |
| jobs: | |
| check: | |
| name: "Check" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.12" | |
| - name: 'Install Dependencies' | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| uv sync --dev --all-extras | |
| - name: 'Lint (ruff)' | |
| run: uv run ruff check . | |
| - name: 'Check Formatting (ruff)' | |
| run: uv run ruff format --check . | |
| - name: 'Check Types' | |
| run: uv run mypy --strict nessclient | |
| docs: | |
| name: "Docs" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: "3.12" | |
| - name: 'Install Dependencies' | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| uv sync --dev --all-extras | |
| uv run pip install -r docs/requirements.txt | |
| - name: 'Build Docs' | |
| run: uv run sphinx-build -W -b html docs docs/_build/html | |
| build: | |
| name: "Build and Test" | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: [3.11, 3.12] | |
| steps: | |
| - uses: actions/checkout@v2 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: 'Install Dependencies' | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install uv | |
| uv sync --dev --all-extras | |
| - name: 'Run Tests (with coverage)' | |
| run: | | |
| uv run coverage run --source=nessclient -m pytest | |
| - uses: codecov/codecov-action@v2 | |
| if: ${{ matrix.python-version == '3.12' }} | |
| - name: "Build" | |
| run: uv build | |
| - uses: actions/upload-artifact@v4 | |
| # Only publish artifacts from Python latest build. | |
| if: ${{ matrix.python-version == '3.12' }} | |
| with: | |
| name: dist | |
| path: dist/ | |
| if-no-files-found: error | |
| release: | |
| name: "Release 🚀" | |
| runs-on: ubuntu-latest | |
| needs: | |
| - build | |
| - check | |
| if: startsWith(github.ref, 'refs/tags') | |
| permissions: | |
| id-token: write | |
| contents: write | |
| steps: | |
| - uses: actions/download-artifact@v4.1.7 | |
| with: | |
| name: dist | |
| path: dist/ | |
| - name: Release to PyPi 📦 | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| - name: Create Github Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| generate_release_notes: true | |
| files: dist/* |