-
-
Notifications
You must be signed in to change notification settings - Fork 907
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1745 from EliahKagan/ci-windows
Test native Windows on CI
- Loading branch information
Showing
12 changed files
with
350 additions
and
78 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,18 +10,19 @@ permissions: | |
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: ["ubuntu-latest", "windows-latest"] | ||
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12"] | ||
include: | ||
- experimental: false | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
defaults: | ||
run: | ||
shell: /bin/bash --noprofile --norc -exo pipefail {0} | ||
shell: bash --noprofile --norc -exo pipefail {0} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
@@ -34,6 +35,12 @@ jobs: | |
python-version: ${{ matrix.python-version }} | ||
allow-prereleases: ${{ matrix.experimental }} | ||
|
||
- name: Set up WSL (Windows) | ||
if: startsWith(matrix.os, 'windows') | ||
uses: Vampire/[email protected] | ||
with: | ||
distribution: Debian | ||
|
||
- name: Prepare this repo for tests | ||
run: | | ||
./init-tests-after-clone.sh | ||
|
@@ -61,9 +68,16 @@ jobs: | |
command -v git python | ||
git version | ||
python --version | ||
python -c 'import sys; print(sys.platform)' | ||
python -c 'import os; print(os.name)' | ||
python -c 'import git; print(git.compat.is_win)' # NOTE: Deprecated. Use os.name directly. | ||
python -c 'import os, sys; print(f"sys.platform={sys.platform!r}, os.name={os.name!r}")' | ||
# For debugging hook tests on native Windows systems that may have WSL. | ||
- name: Show bash.exe candidates (Windows) | ||
if: startsWith(matrix.os, 'windows') | ||
run: | | ||
set +e | ||
bash.exe -c 'printenv WSL_DISTRO_NAME; uname -a' | ||
python -c 'import subprocess; subprocess.run(["bash.exe", "-c", "printenv WSL_DISTRO_NAME; uname -a"])' | ||
continue-on-error: true | ||
|
||
- name: Check types with mypy | ||
run: | | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,4 @@ pytest-cov | |
pytest-instafail | ||
pytest-mock | ||
pytest-sugar | ||
sumtypes |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.