From ae4c99ec1844e8f11c3f504681549c9e99f971d3 Mon Sep 17 00:00:00 2001 From: Sivanantham Chinnaiyan Date: Tue, 6 Feb 2024 12:01:48 +0530 Subject: [PATCH] skip huggingface tests for python 3.8 Signed-off-by: Sivanantham Chinnaiyan --- .github/workflows/e2e-test.yml | 2 +- .github/workflows/python-test.yml | 29 ++++++++++++++++++++++++----- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index af0b5a1e5cf..b2e36ef8d90 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -5,7 +5,7 @@ on: branches: [master, release*] paths: - "**" -# - "!.github/**" + - "!.github/**" - "!docs/**" - "!**.md" - ".github/workflows/e2e-test.yml" diff --git a/.github/workflows/python-test.yml b/.github/workflows/python-test.yml index 4c89c1cafc7..ca43d56da22 100644 --- a/.github/workflows/python-test.yml +++ b/.github/workflows/python-test.yml @@ -36,7 +36,12 @@ jobs: matrix: python-version: ["3.8", "3.9", "3.10", "3.11"] steps: - - uses: actions/checkout@v2 + - name: Checkout source + uses: actions/checkout@v2 + + - name: Free-up disk space + uses: ./.github/actions/free-up-disk-space + - name: Set up Python ${{ matrix.python-version }} id: setup-python uses: actions/setup-python@v4 @@ -46,12 +51,19 @@ jobs: - name: Install Poetry and version plugin run: ./test/scripts/gh-actions/setup-poetry.sh + - name: Configure Poetry cache + run: | + sudo mkdir -p /mnt/poetry + # change permission so that poetry can install without sudo + sudo chown -R $USER /mnt/poetry + poetry config cache-dir /mnt/poetry + # load poetry cache if cache exists - name: Load poetry cache id: cached-poetry-dependencies uses: actions/cache@v3 with: - path: ~/.cache/pypoetry + path: /mnt/poetry key: poetry-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} # ----------------------------------------Kserve Unit Tests-------------------------------------------------------- @@ -225,19 +237,20 @@ jobs: # ----------------------------------------Huggingface Server Unit Tests------------------------------------------------ # load cached huggingface venv if cache exists - name: Load cached huggingface venv + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} id: huggingface-dependencies uses: actions/cache@v3 with: path: /mnt/python/huggingfaceserver-venv key: huggingface-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve/poetry.lock', '**/huggingfaceserver/poetry.lock') }} # install huggingface server dependencies if cache does not exist - - name: Configure poetry + - name: Configure poetry for huggingface server + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} run: | poetry config virtualenvs.path /mnt/python/huggingfaceserver-venv poetry config virtualenvs.in-project false - poetry config virtualenvs.prefer-active-python true - name: Install huggingface dependencies - if: steps.cached-huggingface-dependencies.outputs.cache-hit != 'true' + if: ${{ steps.cached-huggingface-dependencies.outputs.cache-hit != 'true' && !startsWith(steps.setup-python.outputs.python-version, '3.8') }} run: | sudo mkdir -p /mnt/python/huggingfaceserver-venv # change permission so that poetry can install without sudo @@ -245,10 +258,16 @@ jobs: cd python/huggingfaceserver make install_dependencies - name: Install huggingface server + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} run: | cd python/huggingfaceserver make dev_install - name: Test huggingfaceserver + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} run: | cd python/huggingfaceserver poetry run -- pytest --cov=huggingfaceserver + + - name: Free space after tests + run: | + df -hT