Skip to content

Commit

Permalink
Add npsupport to CI pipeline matrix (#552)
Browse files Browse the repository at this point in the history
* bump actions version
https://github.com/actions/checkout
https://github.com/actions/setup-python

* add `npsupport` to matrix

* split `tests` workflow job into `unit-tests` and `install-tests`
  • Loading branch information
junkmd authored Jun 1, 2024
1 parent 2963afd commit 0bb86c8
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/autofmt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ jobs:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: 3.7
- name: Install black
Expand Down
41 changes: 30 additions & 11 deletions .github/workflows/autotest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,26 +5,21 @@ on:
branches: [main]

jobs:
tests:
unit-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, windows-2019]
os: [windows-latest]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
architecture: ['x86', 'x64']
npsupport: ['with npsupport', 'without npsupport']
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: install comtypes
run: |
pip install --upgrade setuptools
python setup.py install
pip uninstall comtypes -y
python test_pip_install.py
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Build and register the OutProc COM server
Expand All @@ -34,8 +29,32 @@ jobs:
./server.exe /RegServer
- name: unittest comtypes
run: |
if ("${{ matrix.npsupport }}" -eq "with npsupport") {
pip install numpy
}
python -m unittest discover -v -s ./comtypes/test -t comtypes\test
- name: Unregister the OutProc COM server
run: |
cd source/CppTestSrv
./server.exe /UnregServer
./server.exe /UnregServer
install-tests:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, windows-2019]
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
architecture: ['x86', 'x64']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: install comtypes
run: |
pip install --upgrade setuptools
python setup.py install
pip uninstall comtypes -y
python test_pip_install.py

0 comments on commit 0bb86c8

Please sign in to comment.