File tree Expand file tree Collapse file tree 5 files changed +32
-48
lines changed
Expand file tree Collapse file tree 5 files changed +32
-48
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- name : release
1+ name : publish
22
33on :
44 release :
Original file line number Diff line number Diff line change 1- name : publish
1+ name : publishable
22
33on :
44 push :
77
88 pull_request :
99 paths :
10- - " .github/pretend_publish_version.py"
10+ - " light_the_torch/**"
11+ - " pyproject.toml"
12+ - " setup.cfg"
13+ - " .gitignore"
14+ - " CONTRIBUTING.rst"
15+ - " LICENSE"
16+ - " MANIFEST.in"
17+ - " README.rst"
18+ - " tox.ini"
19+ - " requirements-dev.txt"
1120 - " .github/workflows/publish.yml"
1221
1322jobs :
2635 - name : Checkout repository
2736 uses : actions/checkout@v2
2837
29- - name : Install pep517 and twine
30- run : pip install pep517 twine
38+ - name : Install dev requirements
39+ run : pip install -r requirements-dev.txt
3140
32- - name : Build source and binary with pretended version
33- run : |
34- pip install setuptools_scm[toml]
35- export SETUPTOOLS_SCM_PRETEND_VERSION=$(python .github/pretend_publish_version.py)
36- python -m pep517.build --source --binary .
37-
38- - name : Check README
39- run : twine check dist/*
40-
41- - name : Upload to TestPyPI
42- env :
43- TWINE_REPOSITORY : testpypi
44- TWINE_USERNAME : ${{ secrets.TESTPYPI_USERNAME }}
45- TWINE_PASSWORD : ${{ secrets.TESTPYPI_PASSWORD }}
46- run : twine upload dist/*
41+ - name : Run unit tests
42+ run : tox -e publishable
Original file line number Diff line number Diff line change 88
99 pull_request :
1010 paths :
11- - " ltt /**"
11+ - " light_the_torch /**"
1212 - " tests/**"
13- - " setup.py"
1413 - " pytest.ini"
1514 - " tox.ini"
1615 - " .coveragerc"
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ requires =
2525 pre-commit
2626whitelist_externals =
2727 pre-commit
28- skip_install = true
28+ skip_install = True
2929deps =
3030commands =
3131 pre-commit run --all-files
@@ -44,3 +44,17 @@ commands =
4444 --config =.flake8
4545 mypy \
4646 --config-file =mypy.ini
47+
48+ [testenv:publishable]
49+ whitelist_externals =
50+ rm
51+ skip_install = True
52+ deps =
53+ check-wheel-contents
54+ pep517
55+ twine
56+ commands =
57+ rm -rf build dist light_the_torch.egg-info
58+ python -m pep517.build --source --binary .
59+ twine check dist/*
60+ check-wheel-contents dist
You can’t perform that action at this time.
0 commit comments