Skip to content

Commit 3cedd7e

Browse files
committed
Use msbuild setup action
1 parent 4c3d33d commit 3cedd7e

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

.github/workflows/test-python.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ jobs:
2626
uses: actions/setup-python@v1
2727
with:
2828
python-version: ${{ matrix.python-version }}
29+
- name: Add msbuild to PATH
30+
if: matrix.os == 'windows-latest'
31+
uses: microsoft/[email protected]
2932
- name: Install dependencies
3033
run: |
3134
python -m pip install --upgrade pip
@@ -40,10 +43,6 @@ jobs:
4043
- name: Test with pytest
4144
shell: bash
4245
run: |
43-
if [ "$RUNNER_OS" == "Windows" ]; then
44-
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
45-
else
46-
python -m pytest
47-
fi
46+
python -m pytest
4847
# - name: Run doctests with pytest
4948
# run: pytest --doctest-modules

.github/workflows/test.yml

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,22 +30,19 @@ jobs:
3030
python-version: ${{ matrix.python }}
3131
env:
3232
PYTHON_VERSION: ${{ matrix.python }}
33+
- name: Add msbuild to PATH
34+
if: matrix.os == 'windows-latest'
35+
uses: microsoft/[email protected]
3336
- name: Install Dependencies
3437
run: |
35-
python -m pip install --upgrade pip flake8 pytest==4.6.6
38+
python -m pip install --upgrade pip flake8 pytest
3639
npm install
3740
- name: Lint Python
3841
run: |
3942
python -m flake8 --version
4043
python -m flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
4144
python -m flake8 . --count --exit-zero --ignore=E111,E114,W503 --max-complexity=10 --max-line-length=127 --statistics
4245
- name: Run Tests
43-
shell: bash
4446
run: |
45-
echo "Testing with Python $(python --version 2>&1)"
4647
npm test
47-
if [ "$RUNNER_OS" == "Windows" ]; then
48-
GYP_MSVS_VERSION=2015 GYP_MSVS_OVERRIDE_PATH="C:\\Dummy" python -m pytest
49-
else
50-
python -m pytest
51-
fi
48+
python -m pytest

0 commit comments

Comments
 (0)