Skip to content

Commit

Permalink
Merge pull request airspeed-velocity#1332 from HaoZeke/addWinCI
Browse files Browse the repository at this point in the history
CI: Try windows on github again
  • Loading branch information
mattip authored Sep 10, 2023
2 parents 388ee1c + 137c228 commit 31c0f39
Show file tree
Hide file tree
Showing 8 changed files with 49 additions and 56 deletions.
47 changes: 0 additions & 47 deletions .appveyor.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: CI
name: Linux CI

on: [push, pull_request]

Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/ci_win.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Windows CI

on: [push, pull_request]

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
test:
name: test
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ["windows-latest"]
python-version: ["3.7"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Python version ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: pyproject.toml

- name: Install and test
shell: pwsh
run: |
python.exe -m pip install .[test]
python.exe -m pip install packaging virtualenv
python.exe -m pytest -v -l -x --timeout=300 --durations=100 test --environment-type=virtualenv
1 change: 1 addition & 0 deletions CHANGES.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ Other Changes and Additions
^^^^^^^^^^^^^^^^^^^^^^^^^^^
- ``asv`` timestamps via ``datetime`` are now Python 3.12 compatible (#1331)
- ``asv`` now provides ``asv[virtualenv]`` as an installable target
- ``asv`` now uses Github Actions exclusively for Windows and Linux

0.6.0 (2023-08-20)
------------------
Expand Down
7 changes: 3 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"asv-runner>=v0.0.9",
"json5",
"tabulate",
"colorama; os_name == 'nt'",
"colorama; platform_system == 'Windows'",
"pyyaml; platform_python_implementation != \"PyPy\"",
"pympler; platform_python_implementation != \"PyPy\"",
]
Expand All @@ -53,8 +53,8 @@ test = [
"feedparser",
"selenium",
"pytest-rerunfailures",
"python-hglib",
"rpy2; platform_python_implementation != \"PyPy\"",
"python-hglib; platform_system != 'Windows'",
"rpy2; platform_system != 'Windows' and platform_python_implementation != 'PyPy'",
]
doc = [
"sphinx",
Expand All @@ -71,7 +71,6 @@ virtualenv = [
hg = [
"python-hglib",
]

[build-system]
requires = [
"wheel",
Expand Down
4 changes: 3 additions & 1 deletion test/test_compare.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
except ImportError:
hglib = None

from .tools import WIN

MACHINE_FILE = abspath(join(dirname(__file__), 'asv-machine.json'))

Expand Down Expand Up @@ -200,7 +201,8 @@ def test_compare(capsys, tmpdir, example_results):

@pytest.mark.parametrize("dvcs_type", [
"git",
pytest.param("hg", marks=pytest.mark.skipif(hglib is None, reason="needs hglib"))
pytest.param("hg", marks=pytest.mark.skipif(hglib is None or WIN,
reason="needs hglib"))
])
def test_compare_name_lookup(dvcs_type, capsys, tmpdir, example_results):
tmpdir = str(tmpdir)
Expand Down
6 changes: 4 additions & 2 deletions test/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ def test_matrix_environments(tmpdir, dummy_packages):
assert output.startswith(str(env._requirements['asv_dummy_test_package_2']))


@pytest.mark.skipif((not HAS_CONDA), reason="Requires conda and conda-build")
@pytest.mark.skipif((not HAS_CONDA),
reason="Requires conda and conda-build")
def test_large_environment_matrix(tmpdir):
# As seen in issue #169, conda can't handle using really long
# directory names in its environment. This creates an environment
Expand Down Expand Up @@ -187,7 +188,8 @@ def test_matrix_expand_include():
with pytest.raises(util.UserError):
list(environment.iter_matrix(conf.environment_type, conf.pythons, conf))

@pytest.mark.skipif((not HAS_CONDA), reason="Requires conda and conda-build")
@pytest.mark.skipif(not (HAS_PYTHON_VER2 or HAS_CONDA),
reason="Requires two usable Python versions")
def test_matrix_expand_include_detect_env_type():
conf = config.Config()
conf.environment_type = None
Expand Down
2 changes: 1 addition & 1 deletion test/test_workflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def basic_conf(tmpdir, dummy_packages):
return generate_basic_conf(tmpdir)


@pytest.mark.flaky_pypy
@pytest.mark.skipif(tools.HAS_PYPY or (os.name == 'nt'), reason="Flaky on pypy and windows")
def test_run_publish(capfd, basic_conf):
tmpdir, local, conf, machine_file = basic_conf
tmpdir = util.long_path(tmpdir)
Expand Down

0 comments on commit 31c0f39

Please sign in to comment.