From 2197236872dfc8a0739d188251a01f3b5811550a Mon Sep 17 00:00:00 2001 From: Sri CHaRan Date: Tue, 30 Dec 2025 00:07:49 +0530 Subject: [PATCH] Add experimental Windows CI workflow --- .github/workflows/ci-tests-windows.yml | 44 ++++++++++++++++++++++++++ .github/workflows/windows-ci.yml | 34 ++++++++++++++++++++ 2 files changed, 78 insertions(+) create mode 100644 .github/workflows/ci-tests-windows.yml create mode 100644 .github/workflows/windows-ci.yml diff --git a/.github/workflows/ci-tests-windows.yml b/.github/workflows/ci-tests-windows.yml new file mode 100644 index 00000000..6ca82a1f --- /dev/null +++ b/.github/workflows/ci-tests-windows.yml @@ -0,0 +1,44 @@ +name: CI Tests (Windows) + +on: [ push, pull_request ] + +jobs: + tests: + strategy: + matrix: + flavour: ["windows-latest"] + include: + - flavour: windows-latest + runner: windows-latest + python: '3.11' + + runs-on: ${{ matrix.runner }} + + steps: + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: ${{ matrix.python }} + cache: pip + + - name: Install test prerequisites + run: | + python -m pip install -U pip + python -m pip install \ + pytest pytest-asyncio \ + "psycopg[binary]!=3.3.0" \ + python-dotenv pyyaml jinja2 psutil sqlalchemy + + - name: Python unit tests (Windows subset) + run: | + python -m pytest \ + test/python/utils \ + test/python/config \ + test/python/api/test_api_types.py \ + test/python/api/search/test_query.py \ + test/python/api/query_processing/test_regex_replace.py \ + test/python/api/query_processing/test_split_japanese_phrases.py \ No newline at end of file diff --git a/.github/workflows/windows-ci.yml b/.github/workflows/windows-ci.yml new file mode 100644 index 00000000..be44f5a9 --- /dev/null +++ b/.github/workflows/windows-ci.yml @@ -0,0 +1,34 @@ +name: Windows CI (experimental) + +on: + pull_request: + push: + +jobs: + windows-smoke: + runs-on: windows-latest + continue-on-error: true #this is a smoke test (experimental); it won't block merges + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.11" + cache: pip + cache-dependency-path: | + packaging/nominatim-db/pyproject.toml + packaging/nominatim-api/pyproject.toml + + - name: Install latest flake8 + run: python -m pip install -U pip flake8 + + - name: Python linting + run: python -m flake8 src test/python test/bdd + + - name: Compile Python sources (smoke) + run: python -m compileall src/nominatim_db src/nominatim_api nominatim-cli.py