Skip to content

Fix Python script path, test correctly #58

Fix Python script path, test correctly

Fix Python script path, test correctly #58

Workflow file for this run

name: test
on:
pull_request:
push:
branches: [main]
workflow_dispatch:
jobs:
tests-cache-packages:
name: "Test (${{ matrix.os }}, ${{ matrix.shell }}, caching: ${{ matrix.cache }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
cache: ["none", "packages", "venv"]
shell: ["bash", "pwsh"]
exclude:
- os: ubuntu-latest
shell: pwsh
- os: macos-latest
shell: pwsh
steps:
- uses: actions/checkout@v4
- name: Set up Python with uv (local source)
uses: ./
with:
python-version: "3.12"
cache: ${{ matrix.cache }}
cache-dependency-path: >-
test_assets/requirements.txt
- name: Check active Python (bash)
if: ${{ matrix.shell == 'bash' }}
shell: bash
run: |
echo "PATH=$PATH"
echo "VIRTUAL_ENV=$VIRTUAL_ENV"
echo "Python: $(which python)"
echo "Python version: $(python --version)"
- name: Check active Python (pwsh)
if: ${{ matrix.shell == 'pwsh' }}
shell: pwsh
run: |
echo "PATH=$env:Path"
echo "VIRTUAL_ENV=$env:VIRTUAL_ENV"
(Get-Command python).Path
python --version
- name: Install dependencies (bash)
if: ${{ matrix.shell == 'bash' }}
shell: bash
run: |
uv pip install -r test_assets/requirements.txt
- name: Install dependencies (pwsh)
if: ${{ matrix.shell == 'pwsh' }}
shell: pwsh
run: |
uv pip install -r test_assets/requirements.txt
- name: Test some stuff (bash)
if: ${{ matrix.shell == 'bash' }}
shell: bash
run: |
python -c "import cloudpathlib; print('cloudpathlib:', cloudpathlib.__version__)"
nbautoexport --version
mkdocs --version
pytest --version
- name: Test some stuff (pwsh)
if: ${{ matrix.shell == 'pwsh' }}
shell: pwsh
run: |
python -c "import cloudpathlib; print('cloudpathlib:', cloudpathlib.__version__)"
nbautoexport --version
mkdocs --version
pytest --version
- name: Test some stuff (Makefile)
run: |
make test