Skip to content
This repository was archived by the owner on Mar 13, 2024. It is now read-only.

Commit 115d1e8

Browse files
committed
2 parents a5fbba3 + 787ce89 commit 115d1e8

File tree

6 files changed

+13
-27
lines changed

6 files changed

+13
-27
lines changed

.github/workflows/code.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -115,8 +115,6 @@ jobs:
115115
run: |
116116
docker run --name test build bash /project/.github/workflows/container_tests.sh
117117
docker cp test:/project/dist .
118-
docker cp test:/project/requirements.txt .
119-
docker cp test:/project/requirements_dev.txt .
120118
docker cp test:/project/cov.xml .
121119
122120
- name: Upload coverage to Codecov
@@ -139,11 +137,8 @@ jobs:
139137
- name: Upload build files
140138
uses: actions/upload-artifact@v3
141139
with:
142-
name: build_files
143-
path: |
144-
dist
145-
requirements.txt
146-
requirements_dev.txt
140+
name: dist
141+
path: dist/*
147142

148143
sdist:
149144
needs: container
@@ -157,7 +152,7 @@ jobs:
157152
# Replace this with the cli command if different to the repo name
158153
# (In the python3-pip-skeleton-cli this is already renamed)
159154
run: |
160-
pip install build_files/dist/*.gz
155+
pip install dist/*.gz
161156
python3-pip-skeleton --version
162157
163158
release:
@@ -175,14 +170,13 @@ jobs:
175170
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
176171
with:
177172
files: |
178-
build_files/*
179-
build_files/dist/*
173+
dist/*
180174
generate_release_notes: true
181175
env:
182176
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183177

184178
- name: Publish to PyPI
185179
env:
186180
TWINE_USERNAME: __token__
187-
TWINE_PASSWORD: ${{ secrets.pypi_token }}
188-
run: pipx run twine upload build_files/dist/*
181+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
182+
run: pipx run twine upload dist/*/whl dist/*.tar.gz

.github/workflows/container_tests.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,14 @@
22
set -x
33

44
cd /project
5-
6-
python -m venv /tmp/venv
7-
source /tmp/venv/bin/activate
5+
source /venv/bin/activate
86

97
touch requirements_dev.txt
108
pip install -r requirements_dev.txt -e .[dev]
11-
pip freeze --exclude-editable > requirements_dev.txt
9+
pip freeze --exclude-editable > dist/requirements_dev.txt
1210

1311
pipdeptree
1412

15-
# ensure non-zero length requirements.txt
16-
echo "# runtime dependencies" >> requirements.txt
17-
1813
git config --global user.email "[email protected]"
1914
git config --global user.name "Your Name"
2015

.github/workflows/docs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ jobs:
99
strategy:
1010
fail-fast: false
1111
matrix:
12-
os: ["ubuntu-latest"]
1312
python: ["3.10"]
1413

1514
runs-on: ubuntu-latest

.github/workflows/linkcheck.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ jobs:
1010
strategy:
1111
fail-fast: false
1212
matrix:
13-
os: ["ubuntu-latest"]
1413
python: ["3.10"]
1514

1615
runs-on: ubuntu-latest

Dockerfile

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ ENV PATH=/venv/bin:$PATH
3030
RUN cd /project && \
3131
pip install --upgrade pip && \
3232
pip install -r requirements.txt dist/*.whl && \
33-
pip freeze > requirements.txt && \
33+
pip freeze > dist/requirements.txt && \
3434
# we don't want to include our own wheel in requirements - remove with sed
35-
sed -i '/file:\/\//d' requirements.txt
35+
# and replace with a comment to avoid a zero length asset upload later
36+
sed -i '/file:/s/^/# Requirements for /' dist/requirements.txt
3637

3738
FROM python:3.10-slim as runtime
3839

setup.cfg

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,16 @@ setup_requires =
3333
# For development tests/docs
3434
dev =
3535
black==22.6.0
36-
pipdeptree
3736
flake8-isort
3837
isort>5.0
3938
mypy
39+
pipdeptree
4040
pre-commit
4141
pytest-cov
42+
setuptools_scm[toml]>=6.2
4243
sphinx-rtd-theme-github-versions
4344
tox
44-
setuptools_scm[toml]>=6.2
4545
types-mock
46-
sphinx-rtd-theme-github-versions
47-
sphinx-apischema
4846

4947
[options.packages.find]
5048
where = src

0 commit comments

Comments
 (0)