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

Commit 787ce89

Browse files
committed
simplifying CI
1 parent 0a9a6b1 commit 787ce89

File tree

6 files changed

+11
-21
lines changed

6 files changed

+11
-21
lines changed

.github/workflows/code.yml

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -110,8 +110,6 @@ jobs:
110110
run: |
111111
docker run --name test build bash /project/.github/workflows/container_tests.sh
112112
docker cp test:/project/dist .
113-
docker cp test:/project/requirements.txt .
114-
docker cp test:/project/requirements_dev.txt .
115113
docker cp test:/project/cov.xml .
116114
117115
- name: Upload coverage to Codecov
@@ -134,11 +132,8 @@ jobs:
134132
- name: Upload build files
135133
uses: actions/upload-artifact@v3
136134
with:
137-
name: build_files
138-
path: |
139-
dist
140-
requirements.txt
141-
requirements_dev.txt
135+
name: dist
136+
path: dist/*
142137

143138
sdist:
144139
needs: container
@@ -151,7 +146,7 @@ jobs:
151146
# ${GITHUB_REPOSITORY##*/} is the repo name without org
152147
# Replace this with the cli command if different to the repo name
153148
run: |
154-
pip install build_files/dist/*.gz
149+
pip install dist/*.gz
155150
${GITHUB_REPOSITORY##*/} --version
156151
157152
release:
@@ -169,14 +164,13 @@ jobs:
169164
uses: softprops/action-gh-release@1e07f4398721186383de40550babbdf2b84acfc5 # v0.1.14
170165
with:
171166
files: |
172-
build_files/*
173-
build_files/dist/*
167+
dist/*
174168
generate_release_notes: true
175169
env:
176170
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
177171

178172
- name: Publish to PyPI
179173
env:
180174
TWINE_USERNAME: __token__
181-
TWINE_PASSWORD: ${{ secrets.pypi_token }}
182-
run: pipx run twine upload build_files/dist/*
175+
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
176+
run: pipx run twine upload dist/*/whl dist/*.tar.gz

.github/workflows/container_tests.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ source /venv/bin/activate
66

77
touch requirements_dev.txt
88
pip install -r requirements_dev.txt -e .[dev]
9-
pip freeze --exclude-editable > requirements_dev.txt
9+
pip freeze --exclude-editable > dist/requirements_dev.txt
1010

1111
pipdeptree
1212

.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: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +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
3535
# and replace with a comment to avoid a zero length asset upload later
36-
sed -i '/file:/s/^/# Requirements for /' requirements.txt
36+
sed -i '/file:/s/^/# Requirements for /' dist/requirements.txt
3737

3838
FROM python:3.10-slim as runtime
3939

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)