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

Commit a4110a3

Browse files
committed
2 parents bd14211 + 9f2d957 commit a4110a3

21 files changed

+86
-59
lines changed

.containerignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ dist/
44
.mypy_cache
55
.tox
66
.venv*
7+
venv*

.devcontainer.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
},
1313
// Set *default* container specific settings.json values on container create.
1414
"settings": {
15-
"python.defaultInterpreterPath": "/usr/local/bin/python",
15+
"python.defaultInterpreterPath": "/venv/bin/python",
1616
"python.linting.enabled": true
1717
},
1818
// Add the IDs of extensions you want installed when the container is created.
@@ -21,12 +21,10 @@
2121
"ms-python.vscode-pylance"
2222
],
2323
// Make sure the files we are mapping into the container exist on the host
24-
"initializeCommand": "bash -c 'for i in $HOME/.inputrc $HOME/.bashrc_dev; do [ -f $i ] || touch $i; done'",
24+
"initializeCommand": "bash -c 'for i in $HOME/.inputrc; do [ -f $i ] || touch $i; done'",
2525
"runArgs": [
26-
"--privileged",
2726
"--net=host",
2827
"-v=${localEnv:HOME}/.ssh:/root/.ssh",
29-
"-v=${localEnv:HOME}/.bashrc_dev:/root/.bashrc",
3028
"-v=${localEnv:HOME}/.inputrc:/root/.inputrc"
3129
],
3230
"mounts": [

.gitattributes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.github/workflows/code.yml

Lines changed: 17 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
pull_request:
66
schedule:
77
# Run every Monday at 8am to check latest versions of dependencies
8-
- cron: "0 8 * * MON"
8+
- cron: "0 8 * * WED"
99

1010
jobs:
1111
lint:
@@ -17,15 +17,15 @@ jobs:
1717
- name: Checkout
1818
uses: actions/checkout@v2
1919

20-
- uses: actions/setup-python@v2
20+
- name: Setup python
21+
uses: actions/setup-python@v4
2122
with:
2223
python-version: "3.10"
2324

2425
- name: Lint
2526
run: |
26-
touch requirements_dev.txt
27-
python -m pip install --upgrade pip
28-
python -m pip install -r requirements_dev.txt -e .[dev]
27+
touch requirements_dev.txt requirements.txt
28+
pip install -r requirements.txt -r requirements_dev.txt -e .[dev]
2929
tox -e pre-commit,mypy
3030
3131
test:
@@ -64,7 +64,7 @@ jobs:
6464
run: pytest tests
6565

6666
- name: Upload coverage to Codecov
67-
uses: codecov/codecov-action@v2
67+
uses: codecov/codecov-action@v3
6868
with:
6969
name: ${{ matrix.python }}/${{ matrix.os }}
7070
files: cov.xml
@@ -82,14 +82,6 @@ jobs:
8282
with:
8383
fetch-depth: 0
8484

85-
- name: Cache Docker layers
86-
uses: actions/cache@v3
87-
with:
88-
path: /tmp/.buildx-cache
89-
key: ${{ runner.os }}-buildx-${{ github.sha }}
90-
restore-keys: |
91-
${{ runner.os }}-buildx-
92-
9385
- name: Log in to GitHub Docker Registry
9486
if: github.event_name != 'pull_request'
9587
uses: docker/login-action@v2
@@ -117,16 +109,21 @@ jobs:
117109
tags: build:latest
118110
context: .
119111
target: build
120-
cache-from: type=local,src=/tmp/.buildx-cache
121-
cache-to: type=local,dest=/tmp/.buildx-cache
122112
load: true
123113

124114
- name: Run tests in the container locked with requirements_dev.txt
125115
run: |
126-
docker run --name test build bash /project/tests/container_tests.sh
116+
docker run --name test build bash /project/.github/workflows/container_tests.sh
127117
docker cp test:/project/dist .
128118
docker cp test:/project/requirements.txt .
129119
docker cp test:/project/requirements_dev.txt .
120+
docker cp test:/project/cov.xml .
121+
122+
- name: Upload coverage to Codecov
123+
uses: codecov/codecov-action@v3
124+
with:
125+
name: 3.10-locked/ubuntu-latest
126+
files: cov.xml
130127

131128
- name: Build runtime image
132129
uses: docker/build-push-action@v3
@@ -135,8 +132,6 @@ jobs:
135132
tags: ${{ steps.meta.outputs.tags }}
136133
context: .
137134
labels: ${{ steps.meta.outputs.labels }}
138-
cache-from: type=local,src=/tmp/.buildx-cache
139-
cache-to: type=local,dest=/tmp/.buildx-cache
140135

141136
- name: Upload build files
142137
uses: actions/upload-artifact@v3
@@ -152,28 +147,20 @@ jobs:
152147
runs-on: ubuntu-latest
153148

154149
steps:
155-
- name: Checkout
156-
uses: actions/checkout@v2
157-
158-
- uses: actions/setup-python@v2
159-
with:
160-
python-version: "3.10"
161-
162150
- uses: actions/download-artifact@v3
163151

164152
- name: Install sdist in a venv and check cli works
165153
# ${GITHUB_REPOSITORY##*/} is the repo name without org
166154
# Replace this with the cli command if different to the repo name
167155
# (In the python3-pip-skeleton-cli this is already renamed)
168156
run: |
169-
python -m pip install --upgrade pip
170-
python -m pip install build_files/dist/*.gz
157+
pip install build_files/dist/*.gz
171158
python3-pip-skeleton --version
172159
173160
release:
174161
# upload to PyPI and make a release on every tag
175162
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
176-
needs: [lint, container]
163+
needs: container
177164
runs-on: ubuntu-latest
178165

179166
steps:
@@ -186,6 +173,7 @@ jobs:
186173
with:
187174
files: |
188175
build_files/*
176+
build_files/dist/*
189177
generate_release_notes: true
190178
env:
191179
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
run: tox -e docs
4545

4646
- name: Move to versioned directory
47-
# e.g. master or 0.1.2
47+
# e.g. main or 0.1.2
4848
run: mv build/html ".github/pages/${GITHUB_REF##*/}"
4949

5050
- name: Write versions.txt

.github/workflows/linkcheck.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Link Check
33
on:
44
schedule:
55
# Run every Monday at 8am to check URL links still resolve
6-
- cron: "0 8 * * MON"
6+
- cron: "0 8 * * WED"
77

88
jobs:
99
docs:
@@ -16,10 +16,6 @@ jobs:
1616
runs-on: ubuntu-latest
1717

1818
steps:
19-
- name: Avoid git conflicts when tag and branch pushed at same time
20-
if: startsWith(github.ref, 'refs/tags')
21-
run: sleep 60
22-
2319
- name: Checkout
2420
uses: actions/checkout@v2
2521
with:

.gitignore

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,8 @@ docs/_build/
6060
# PyBuilder
6161
target/
6262

63-
# DLS build dir and virtual environment
64-
/prefix/
65-
/venv/
66-
/lightweight-venv/
67-
/installed.files
63+
# likely venv names
6864
.venv*
65+
venv*
66+
6967

.gitremotes

Lines changed: 0 additions & 1 deletion
This file was deleted.

.vscode/extensions.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
{
22
"recommendations": [
3+
"ms-vscode-remote.remote-containers"
34
"ms-python.vscode-pylance",
45
"ms-python.python",
56
"ryanluker.vscode-coverage-gutters"
67
]
7-
}
8+
}

0 commit comments

Comments
 (0)