GH-51: feat: Add pipeline metadata serialization #66
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: Python Linting, Formatting, Testing, Coverage | |
| on: | |
| pull_request: | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '.github/workflows/**' | |
| - 'pyproject.toml' | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| paths: | |
| - 'src/**' | |
| - 'tests/**' | |
| - '.github/workflows/**' | |
| - 'pyproject.toml' | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| python-version: ["3.10", "3.11", "3.12"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| lfs: true | |
| - name: Set up getML | |
| env: | |
| URL_GETML_ENTERPRISE_AMD64: ${{ secrets.URL_GETML_ENTERPRISE_1_5_1_AMD64_LINUX }} | |
| URL_GETML_ENTERPRISE_ARM64: ${{ secrets.URL_GETML_ENTERPRISE_1_5_1_ARM64_LINUX }} | |
| run: | | |
| set -e | |
| set -o pipefail | |
| GETML_INSTALL_DIR="$HOME/.getML" | |
| URL_GETML_ENTERPRISE="" | |
| ARCHITECTURE="${{ runner.arch }}" | |
| if [ "$ARCHITECTURE" == "X64" ]; then | |
| URL_GETML_ENTERPRISE="$URL_GETML_ENTERPRISE_AMD64" | |
| echo "Using AMD64 (X64) getML enterprise URL." | |
| elif [ "$ARCHITECTURE" == "ARM64" ]; then | |
| URL_GETML_ENTERPRISE="$URL_GETML_ENTERPRISE_ARM64" | |
| echo "Using ARM64 getML enterprise URL." | |
| else | |
| echo "Error: Unsupported architecture '$ARCHITECTURE'." | |
| exit 1 | |
| fi | |
| if [ -z "$URL_GETML_ENTERPRISE" ]; then | |
| echo "Error: The URL of the getML enterprise for architecture '$ARCHITECTURE' is missing." | |
| exit 1 | |
| fi | |
| mkdir -p "$GETML_INSTALL_DIR" | |
| curl -sSL "$URL_GETML_ENTERPRISE" | tar -xzC "$GETML_INSTALL_DIR" | |
| echo "getML installation complete. Contents of '$GETML_INSTALL_DIR':" | |
| ls -la "$GETML_INSTALL_DIR" | |
| - name: Set up Python ${{ matrix.python-version }} and uv | |
| uses: astral-sh/setup-uv@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| cache-dependency-glob: | | |
| **/pyproject.toml | |
| - name: Install dependencies (for Python ${{ matrix.python-version }}) | |
| run: | | |
| uv sync \ | |
| --python ${{ matrix.python-version }} \ | |
| --group development \ | |
| --extra-index-url https://europe-west1-python.pkg.dev/getml-infra/wheel/simple | |
| - name: Check linting and formatting | |
| run: | | |
| uv run ruff check --extend-ignore FIX . | |
| uv run ruff format --check . | |
| uv run basedpyright . | |
| - name: Show TODOs | |
| run: | | |
| uv run ruff check --select FIX . || true | |
| - name: Check tests and coverage (for Python ${{ matrix.python-version }}) | |
| run: | | |
| uv run pytest \ | |
| --cov=./src \ | |
| --cov-report=term \ | |
| --cov-fail-under=80 |