Skip to content

Commit

Permalink
Run coverage on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
miguelsousa authored and cjchapman committed May 23, 2018
1 parent d294035 commit d64f22f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,24 +22,26 @@ install:
- python --version
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""
- python -m pip install -U pip setuptools setuptools_scm wheel
- python -m pip install pytest
- python setup.py bdist_wheel
- for %%f in (dist\*.whl) do (set "WHEEL=%%f")
- python -m pip install -U --force-reinstall %WHEEL%
- python -m pip install codecov
- python -m pip install pytest-cov

build: false

test_script:
- python -m pytest -v
- python -m pytest -v --cov
- python -m pip uninstall --yes afdko

artifacts:
# archive the generated packages in the ci.appveyor.com build report
- path: dist\*.whl
name: release_wheel

# Deploy wheel on tags to PyPI
on_success:
- codecov
# Deploy wheel on tags to PyPI
- ps: >-
if($env:APPVEYOR_REPO_TAG -eq 'true') {
Write-Output ("Deploying " + $env:APPVEYOR_REPO_TAG_NAME + " to PyPI...")
Expand Down

2 comments on commit d64f22f

@miguelsousa
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage went from 16% down to 5% after this commit.
Great flawless support 😒

@miguelsousa
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found out a few more details about the coverage drop:

  • The flags added in 401b7a2 are not necessary; the reports are uploaded just fine, with or without them. Compare before and after; all 3 reports exist for both commits.
  • The explanation for the coverage drop is two-fold:
    1. Both Travis and AppVeyor run when the PR is created, and 3 reports get uploaded. When the PR is merged AppVeyor runs again, and only 2 reports get uploaded. The last commit (with two reports) then makes up Codecov's percentage score.
    2. The tests are all running and passing on Windows, but the coverage score is much lower (5%); this suggests that the Python scripts that are used by the tests are in a different location than expected.
      I recall that coverage reporting wasn't working until I added this line to Travis:
      export PATH=$PATH:'/Users/travis/Library/Python/2.7/bin'
      Something equivalent is probably needed on the AppVeyor side.

Right now I don't have time to sort this out, so I'm just going to revert .travis.yml and .appveyor.yml to their older versions for now.

Please sign in to comment.