release: cut v0.7.4 — Mode B streaming (typed StreamEvent pipeline) #194
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
| name: CI | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: | |
| - "v*" | |
| pull_request: | |
| branches: [main, master] | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| env: | |
| POETRY_VERSION: "1.8.5" | |
| jobs: | |
| quality: | |
| name: Quality | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: ${{ env.POETRY_VERSION }} | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-py3.11-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| venv-${{ runner.os }}-py3.11- | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --with dev --no-root | |
| - name: Validate lockfile | |
| run: poetry check --lock | |
| - name: Run Ruff Linter | |
| run: poetry run ruff check . | |
| - name: Run Ruff Formatter Check | |
| run: poetry run ruff format --check . | |
| - name: Run Mypy | |
| run: poetry run mypy . | |
| test: | |
| name: Test (Python ${{ matrix.python-version }}) | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: ${{ env.POETRY_VERSION }} | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-${{ runner.os }}-py${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| restore-keys: | | |
| venv-${{ runner.os }}-py${{ matrix.python-version }}- | |
| - name: Install dependencies | |
| run: poetry install --no-interaction --with dev --no-root | |
| - name: Run tests | |
| run: poetry run pytest -q --cov=loom --cov-report=xml --cov-fail-under=70 | |
| - name: Upload Coverage Report | |
| uses: codecov/codecov-action@v4 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| file: ./coverage.xml | |
| fail_ci_if_error: false | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload HTML Coverage Report | |
| uses: actions/upload-artifact@v4 | |
| if: matrix.python-version == '3.11' | |
| with: | |
| name: coverage-report-html | |
| path: htmlcov/ | |
| retention-days: 30 | |
| security: | |
| name: Security Audit | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| continue-on-error: true | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install Poetry | |
| uses: snok/install-poetry@v1 | |
| with: | |
| version: ${{ env.POETRY_VERSION }} | |
| virtualenvs-create: true | |
| virtualenvs-in-project: true | |
| installer-parallel: true | |
| - name: Install export plugin | |
| run: poetry self add poetry-plugin-export | |
| - name: Export dependencies | |
| run: poetry export -f requirements.txt --without-hashes --with dev -o requirements.txt | |
| - name: Run dependency audit | |
| run: | | |
| python -m pip install --upgrade pip pip-audit | |
| pip-audit -r requirements.txt |