From 3827563e3e9c7911f454eba7f001f202a2722e62 Mon Sep 17 00:00:00 2001 From: Morgan Epp <60796713+epmog@users.noreply.github.com> Date: Thu, 26 Mar 2026 12:52:37 -0500 Subject: [PATCH] test: temp on D: Signed-off-by: Morgan Epp <60796713+epmog@users.noreply.github.com> --- .github/workflows/test_windows_temp.yml | 66 +++++++++++++++++++++++++ hatch.toml | 5 +- 2 files changed, 69 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/test_windows_temp.yml diff --git a/.github/workflows/test_windows_temp.yml b/.github/workflows/test_windows_temp.yml new file mode 100644 index 00000000..0f88128f --- /dev/null +++ b/.github/workflows/test_windows_temp.yml @@ -0,0 +1,66 @@ +name: Test Windows Temp Dir + +on: + push: + branches: [ mainline ] + pull_request: + branches: [ mainline ] + workflow_dispatch: + +jobs: + Python: + name: windows-latest, python ${{ matrix.python-version }} + runs-on: windows-latest + permissions: + contents: read + env: + PYTHON: ${{ matrix.python-version }} + TEMP: D:\Temp + TMP: D:\Temp + HATCH_DATA_DIR: D:\Temp\hatch + HATCH_CACHE_DIR: D:\Temp\hatch\Cache + UV_CACHE_DIR: D:\Temp\uv-cache + HATCH_ENV_INSTALLER: uv + strategy: + matrix: + python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.14'] + steps: + - name: Prepare temp dir + run: mkdir -p D:\Temp + shell: cmd + + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python-version }} + + - name: Set up uv + uses: astral-sh/setup-uv@v4 + + - name: Pin virtualenv for Python 3.9 + if: matrix.python-version == '3.9' + run: uv tool install --with "virtualenv<21" hatch + + - name: Install Hatch + if: matrix.python-version != '3.9' + run: uv tool install hatch + + - name: Create Hatch env + run: hatch -v env create + + - name: Run Ruff + run: hatch -v run ruff check src test + + - name: Run Black + run: hatch -v run black --check --diff src test + + - name: Run Mypy + run: hatch -v run mypy src test + + - name: Run Build + run: hatch -v build + + - name: Run Tests + run: hatch run test diff --git a/hatch.toml b/hatch.toml index 2f2434a3..3621d577 100644 --- a/hatch.toml +++ b/hatch.toml @@ -1,10 +1,11 @@ [envs.default] +installer = "uv" pre-install-commands = [ - "pip install -r requirements-testing.txt" + "uv pip install -r requirements-testing.txt" ] [envs.default.scripts] -sync = "pip install -r requirements-testing.txt" +sync = "uv pip install -r requirements-testing.txt" test = "pytest test/ --cov-config pyproject.toml --ignore=test/openjd/model/benchmark {args}" benchmark = "pytest test/openjd/model/benchmark --no-cov {args}" typing = "mypy {args:src test}"