Skip to content

Commit cff8215

Browse files
authored
Move Windows CI from AppVeyor to GitHub Actions (#2628)
1 parent cef8616 commit cff8215

File tree

3 files changed

+33
-39
lines changed

3 files changed

+33
-39
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test Codespell Windows
2+
on:
3+
- push
4+
- pull_request
5+
jobs:
6+
test-windows:
7+
name: Test Windows
8+
runs-on: windows-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Setup python
12+
uses: actions/setup-python@v4
13+
with:
14+
python-version: '3.7'
15+
- name: Install dependencies
16+
run: |
17+
python --version
18+
pip install -U pip
19+
pip install chardet setuptools
20+
pip install -e .[dev]
21+
- run: codespell --help
22+
- run: codespell --version
23+
- run: pytest codespell_lib
24+
- uses: codecov/codecov-action@v3

appveyor.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

codespell_lib/tests/test_basic.py

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -514,10 +514,15 @@ def test_check_hidden(
514514
assert cs.main("--check-hidden", d) == 2
515515
assert cs.main("--check-hidden", "--check-filenames", d) == 5
516516
# check again with a relative path
517-
rel = op.relpath(d)
518-
assert cs.main(rel) == 0
519-
assert cs.main("--check-hidden", rel) == 2
520-
assert cs.main("--check-hidden", "--check-filenames", rel) == 5
517+
try:
518+
rel = op.relpath(d)
519+
except ValueError:
520+
# Windows: path is on mount 'C:', start on mount 'D:'
521+
pass
522+
else:
523+
assert cs.main(rel) == 0
524+
assert cs.main("--check-hidden", rel) == 2
525+
assert cs.main("--check-hidden", "--check-filenames", rel) == 5
521526
# hidden subdirectory
522527
assert cs.main(d) == 0
523528
assert cs.main("--check-hidden", d) == 2

0 commit comments

Comments
 (0)