Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix GH actions unittesting #29

Merged
merged 5 commits into from
Jan 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ jobs:
python -m pip install --upgrade pip
pip install --no-binary lxml lxml
pip install coverage
pip install .
pip install .["testing"]
- name: Run unittests with coverage report
continue-on-error: true
# continue-on-error: true
run: |
coverage run -m unittest discover -p "*_test.py"
coverage run --include="./wpull/**/*.py" -m unittest discover -p "*_test.py"
- name: Generate coverage report
if: always()
run: |
coverage xml --data-file=.coverage
# You can test your matrix by printing the current Python version
# - name: Display Python version
# run: python -c "import sys; print(sys.version)"
- name: Get Cover
if: always()
uses: orgoro/[email protected]
with:
coverageFile: coverage.xml
Expand Down
4 changes: 2 additions & 2 deletions freezer/pyinstaller/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import copy
import subprocess
import sys
import distutils.util
import sysconfig
import platform
import os.path
import os
Expand Down Expand Up @@ -88,7 +88,7 @@ def run_env(args):
print('Zip.')
wpull_version = run_env_py(['wpull', '--version'], get_output=True)\
.decode('ascii').strip()
platform_string = distutils.util.get_platform()
platform_string = sysconfig.get_platform()
python_version = platform.python_version()
date_string = time.strftime('%Y%m%d%H%M%S', time.gmtime())
zip_name = 'wpull-{}-{}-{}-{}'.format(
Expand Down
9 changes: 7 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ docs = [
"sphinxcontrib-napoleon>=0.2.6,<=0.5.0",
]
testing = [
"warcat",
"warcat"
]

[tool.setuptools]
Expand Down Expand Up @@ -74,4 +74,9 @@ Source = "https://github.com/ArchiveTeam/ludios_wpull"

[project.scripts]
wpull = "wpull.application.main:main"
wpull4 = "wpull.application.main:main"
wpull5 = "wpull.application.main:main"

[tool.coverage.run]
omit = [
"index_html.generated.py"
]
4 changes: 2 additions & 2 deletions wpull/version_test.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# encoding=utf-8
from distutils.version import StrictVersion
from packaging.version import parse
import unittest

import wpull.version
Expand All @@ -8,7 +8,7 @@

class TestVersion(unittest.TestCase):
def test_valid_version_str(self):
StrictVersion(wpull.version.__version__)
parse(wpull.version.__version__)

def test_version_string_buidler(self):
self.assertEqual(
Expand Down
Loading