V0.3 content type bug fixes (#122) #16
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: Pytest Tests For Development | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
jobs: | |
test: | |
strategy: | |
matrix: | |
include: | |
- os: windows-latest | |
python-version: 3.11 | |
- os: ubuntu-latest | |
python-version: 3.11 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Install uv (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
python -m pip install uv | |
- name: Install dependencies (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: | | |
uv venv .venv | |
source .venv/bin/activate | |
uv sync --group test --group dev | |
- name: Install dependencies (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
uv venv .venv | |
.venv\Scripts\activate | |
uv sync --group test --group dev | |
- name: Run pytest tests (Linux/macOS) | |
if: runner.os != 'Windows' | |
run: | | |
source .venv/bin/activate | |
pytest tests/pytests-new -s -v --cov=hololinked --cov-report=term-missing | |
- name: Run pytest tests (Windows) | |
if: runner.os == 'Windows' | |
run: | | |
.venv\Scripts\activate | |
pytest tests/pytests-new -s -v --cov=hololinked --cov-report=term-missing | |
- name: Upload coverage report as artifact | |
uses: actions/upload-artifact@v4 | |
if: runner.os != 'Windows' | |
with: | |
name: pytest-coverage-report-ubuntu-latest-py3.11 | |
path: coverage.xml | |
if-no-files-found: warn | |
publish: | |
name: Publish coverage (disabled for pytest per issue #107) | |
needs: test | |
runs-on: ubuntu-latest | |
if: ${{ false }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Download Ubuntu 3.11 coverage artifact | |
id: dl | |
uses: actions/download-artifact@v4 | |
with: | |
name: pytest-coverage-report-ubuntu-latest-py3.11 | |
path: . | |
continue-on-error: true | |
- name: Upload coverage to Codecov (disabled) | |
if: false | |
uses: codecov/codecov-action@v4 | |
with: | |
files: coverage.xml | |
- name: Skip note (coverage upload disabled for pytest) | |
run: echo "Skipping Codecov upload in pytest workflow per issue #107." |