Skip to content

Commit e5dc719

Browse files
committed
fix the tox error for including package data and add workflow in pull-request.yml
1 parent 0e2aab0 commit e5dc719

File tree

4 files changed

+10
-26
lines changed

4 files changed

+10
-26
lines changed

.github/workflows/pull-request.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,11 @@ jobs:
2222
run: |
2323
python -m pip install --upgrade pip
2424
pip install tox
25+
pip install tox-wheel
26+
sudo npm install -g license-checker
2527
- name: Run Tox
2628
run: |
27-
tox -e release
29+
tox -e run_ubuntu
2830
reuse:
2931
runs-on: ubuntu-latest
3032
steps:

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
pyinstaller
22
tox
3+
tox-wheel
34
pytest
45
pytest-cov
56
pytest-flake8

tests/test_pub/iamport_flutter/tmp_license_scanner_output.txt

Whitespace-only changes.

tox.ini

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ skipdist = true
66
toxworkdir = {toxinidir}/tests/
77

88
[testenv]
9+
wheel = true
910
install_command = pip install {opts} {packages}
1011
basepython= python3.6
1112
whitelist_externals = npm
@@ -21,40 +22,23 @@ exclude = .tox/*
2122
ignore = E722
2223

2324
[testenv:test_run]
24-
commands =
25-
# Test for Pypi
26-
fosslight_dependency -p tests/test_pypi -o tests/result/pip
27-
# Test for NPM (without optional command)
28-
fosslight_dependency -p tests/test_npm1 -o tests/result/npm1
29-
# Test for NPM (with optional command)
30-
fosslight_dependency -p tests/test_npm2 -o tests/result/npm2 -m npm
31-
# Test for Maven (without optional command)
32-
fosslight_dependency -p tests/test_maven1/lombok.maven -o tests/result/maven1
33-
# Test for Maven (with optional command)
34-
fosslight_dependency -p tests/test_maven2 -o tests/result/maven2 -m maven
35-
# Test for Gradle
36-
fosslight_dependency -p tests/test_gradle/jib -o tests/result/gradle -m gradle
37-
# Test for Pub
38-
fosslight_dependency -p tests/test_pub/iamport_flutter -o tests/result/pub
39-
40-
[testenv:release]
41-
deps =
42-
-r{toxinidir}/requirements-dev.txt
43-
4425
commands =
4526
# Print Help Message
4627
fosslight_dependency -h
4728
# Print Current Version
4829
fosslight_dependency -v
4930
# Test for PEP8
5031
pytest -v --flake8
32+
33+
[testenv:run_ubuntu]
34+
deps =
35+
-r{toxinidir}/requirements-dev.txt
36+
commands =
5137
# Test for Pypi
5238
fosslight_dependency -p tests/test_pypi -o tests/result/pip
5339
# Test for NPM (without optional command)
54-
npm install --prefix {toxworkdir}/test_npm1 license-checker
5540
fosslight_dependency -p tests/test_npm1 -o tests/result/npm1
5641
# Test for NPM (with optional command)
57-
npm install --prefix {toxworkdir}/test_npm2 license-checker
5842
fosslight_dependency -p tests/test_npm2 -o tests/result/npm2 -m npm
5943
# Test for Maven (without optional command)
6044
fosslight_dependency -p tests/test_maven1/lombok.maven -o tests/result/maven1
@@ -64,6 +48,3 @@ commands =
6448
fosslight_dependency -p tests/test_gradle/jib -o tests/result/gradle -m gradle
6549
# Test for Pub
6650
fosslight_dependency -p tests/test_pub/iamport_flutter -o tests/result/pub
67-
# Test for Excutable file
68-
pyinstaller --onefile cli.py --additional-hooks-dir=hooks --add-binary=src/fosslight_dependency/third_party/nomos/nomossa:third_party/nomos
69-
{toxinidir}/dist/cli -o test_result_cli

0 commit comments

Comments
 (0)