|
| 1 | +--- |
| 2 | +name: Test base package functionality |
| 3 | +on: |
| 4 | + workflow_call: |
| 5 | + inputs: |
| 6 | + os: |
| 7 | + description: OS |
| 8 | + type: string |
| 9 | + required: true |
| 10 | + python-version: |
| 11 | + description: Python version |
| 12 | + type: string |
| 13 | + required: true |
| 14 | + git-ref: |
| 15 | + description: Git branch or ref |
| 16 | + type: string |
| 17 | + required: false |
| 18 | + default: '' |
| 19 | + workflow_dispatch: |
| 20 | + inputs: |
| 21 | + os: |
| 22 | + description: OS |
| 23 | + type: choice |
| 24 | + options: [ubuntu-latest, macos-13, windows-latest] |
| 25 | + required: false |
| 26 | + default: ubuntu-latest |
| 27 | + python-version: |
| 28 | + description: Python version |
| 29 | + type: choice |
| 30 | + options: ['3.9', '3.10', '3.11', '3.12'] |
| 31 | + required: false |
| 32 | + default: '3.11' |
| 33 | + git-ref: |
| 34 | + description: Git branch or ref |
| 35 | + type: string |
| 36 | + required: false |
| 37 | + default: '' |
| 38 | +jobs: |
| 39 | + test-base-package-functionality: |
| 40 | + name: test-base-package-functionality |
| 41 | + runs-on: ${{ inputs.os }} |
| 42 | + env: |
| 43 | + ZENML_DEBUG: 1 |
| 44 | + ZENML_ANALYTICS_OPT_IN: false |
| 45 | + PYTHONIOENCODING: utf-8 |
| 46 | + UV_HTTP_TIMEOUT: 600 |
| 47 | + OBJC_DISABLE_INITIALIZE_FORK_SAFETY: 'YES' |
| 48 | + if: ${{ ! startsWith(github.event.head_commit.message, 'GitBook:') && ! (inputs.os == 'windows-latest' && inputs.python-version == '3.11') && ! (inputs.os == 'windows-latest' && inputs.python-version == '3.12') }} |
| 49 | + defaults: |
| 50 | + run: |
| 51 | + shell: bash |
| 52 | + steps: |
| 53 | + - name: Checkout code |
| 54 | + |
| 55 | + with: |
| 56 | + repository: ${{ github.repository }} |
| 57 | + ref: ${{ github.event.pull_request.head.sha }} |
| 58 | + # fetch-depth: 0 # Fetch all history for all branches and tags |
| 59 | + - name: Set up Python |
| 60 | + |
| 61 | + with: |
| 62 | + python-version: ${{ inputs.python-version }} |
| 63 | + - name: Install uv |
| 64 | + uses: astral-sh/setup-uv@v6 |
| 65 | + with: |
| 66 | + version: 0.8.14 |
| 67 | + - name: Build server image |
| 68 | + run: | |
| 69 | + docker build -t zenml-server-dev -f docker/zenml-server-dev.Dockerfile . |
| 70 | + - name: Install base package |
| 71 | + run: | |
| 72 | + uv pip install --system . |
| 73 | + - name: Start local server |
| 74 | + run: | |
| 75 | + zenml login --local --docker --image=zenml-server-dev |
| 76 | + - name: Test server connection works |
| 77 | + run: | |
| 78 | + zenml stack list |
0 commit comments