From 0e1d1efc106ba43e802c41ccb9e765ee1b2b07ad Mon Sep 17 00:00:00 2001 From: rasbt Date: Wed, 19 Feb 2025 19:33:20 -0600 Subject: [PATCH] powershell -> bash --- .../workflows/basic-tests-windows-uv-pip.yml | 10 +++--- .github/workflows/basic-tests-windows-uv.yml | 34 ++++++++++--------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/.github/workflows/basic-tests-windows-uv-pip.yml b/.github/workflows/basic-tests-windows-uv-pip.yml index bf7aeb1..a89bd25 100644 --- a/.github/workflows/basic-tests-windows-uv-pip.yml +++ b/.github/workflows/basic-tests-windows-uv-pip.yml @@ -39,10 +39,10 @@ jobs: pip install uv uv venv --python=python3.11 source .venv/Scripts/activate - pip install -r requirements.txt # because of dependency issue on Windows when using `uv pip` - pip install tensorflow-io-gcs-filesystem==0.31.0 # Explicit for Windows - pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt - pip install pytest-ruff nbval + uv pip install --no-binary tensorflow-io-gcs-filesystem + uv pip install -r requirements.txt + uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt + uv pip install pytest-ruff nbval - name: Run Python Tests shell: bash @@ -60,4 +60,4 @@ jobs: source .venv/Scripts/activate pytest --ruff --nbval ch02/01_main-chapter-code/dataloader.ipynb pytest --ruff --nbval ch03/01_main-chapter-code/multihead-attention.ipynb - pytest --ruff --nbval ch02/04_bonus_dataloader-intuition/dataloader-intuition.ipynb \ No newline at end of file + pytest --ruff --nbval ch02/04_bonus_dataloader-intuition/dataloader-intuition.ipynb diff --git a/.github/workflows/basic-tests-windows-uv.yml b/.github/workflows/basic-tests-windows-uv.yml index d49a93c..7218685 100644 --- a/.github/workflows/basic-tests-windows-uv.yml +++ b/.github/workflows/basic-tests-windows-uv.yml @@ -32,28 +32,30 @@ jobs: python-version: '3.11' - name: Install dependencies - shell: pwsh + shell: bash run: | - powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" - $env:Path = "C:\Users\runneradmin\.local\bin;$env:Path" + curl -fsSL https://astral.sh/uv/install.sh | bash + export PATH=$HOME/.local/bin:$PATH uv python install 3.11 - $env:UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem" + export UV_PIP_OPTS="--no-binary tensorflow-io-gcs-filesystem" uv sync --dev uv pip install -r ch05/07_gpt_to_llama/tests/test-requirements-extra.txt uv pip install pytest-ruff nbval - - name: Run Python Tests - shell: pwsh + - name: Test Selected Python Scripts (uv) + shell: bash run: | - .venv\Scripts\python -m pytest --ruff setup/02_installing-python-libraries/tests.py - .venv\Scripts\python -m pytest --ruff ch04/01_main-chapter-code/tests.py - .venv\Scripts\python -m pytest --ruff ch05/01_main-chapter-code/tests.py - .venv\Scripts\python -m pytest --ruff ch05/07_gpt_to_llama/tests/tests.py - .venv\Scripts\python -m pytest --ruff ch06/01_main-chapter-code/tests.py + source .venv/bin/activate + pytest --ruff setup/02_installing-python-libraries/tests.py + pytest --ruff ch04/01_main-chapter-code/tests.py + pytest --ruff ch05/01_main-chapter-code/tests.py + pytest --ruff ch05/07_gpt_to_llama/tests/tests.py + pytest --ruff ch06/01_main-chapter-code/tests.py - - name: Run Jupyter Notebook Tests - shell: pwsh + - name: Validate Selected Jupyter Notebooks (uv) + shell: bash run: | - .venv\Scripts\python -m pytest --ruff --nbval ch02/01_main-chapter-code/dataloader.ipynb - .venv\Scripts\python -m pytest --ruff --nbval ch03/01_main-chapter-code/multihead-attention.ipynb - .venv\Scripts\python -m pytest --ruff --nbval ch02/04_bonus_dataloader-intuition/dataloader-intuition.ipynb + source .venv/bin/activate + pytest --ruff --nbval ch02/01_main-chapter-code/dataloader.ipynb + pytest --ruff --nbval ch03/01_main-chapter-code/multihead-attention.ipynb + pytest --ruff --nbval ch02/04_bonus_dataloader-intuition/dataloader-intuition.ipynb