Skip to content

Commit 7fd1ddd

Browse files
committed
Optional vscode, github conf in base project
1 parent 91f64db commit 7fd1ddd

4 files changed

Lines changed: 100 additions & 2 deletions

File tree

src/dipdup/project.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,8 +241,6 @@ def answers_from_terminal(package: str | None = None) -> Answers:
241241
value=answers['email'],
242242
)
243243

244-
big_yellow_echo('Now choose versions of software you want to use.')
245-
246244
_, answers['postgres_image'] = prompt_anyof(
247245
question='Choose PostgreSQL version. Try TimescaleDB when working with time series.',
248246
options=(
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
push:
7+
branches:
8+
- '**'
9+
10+
jobs:
11+
test:
12+
name: Test
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out the repo
16+
uses: actions/checkout@v4
17+
18+
- name: Install uv
19+
uses: astral-sh/setup-uv@v5
20+
21+
- name: Install project
22+
run: make install
23+
24+
- name: Run tests
25+
run: uv run make all
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Build
2+
concurrency:
3+
group: ${{ github.workflow }}-${{ github.ref }}
4+
cancel-in-progress: true
5+
on:
6+
push:
7+
branches:
8+
- '**'
9+
10+
jobs:
11+
build:
12+
name: Build
13+
runs-on: ubuntu-22.04
14+
env:
15+
DOCKER_REGISTRY: ghcr.io
16+
DOCKER_IMAGE_NAME: ${{ github.repository }}
17+
18+
steps:
19+
- name: Check out the repo
20+
uses: actions/checkout@v4
21+
22+
# NOTE: Uncomment to enable multi-arch builds
23+
# - name: Set up QEMU
24+
# uses: docker/setup-qemu-action@v3
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
with:
29+
install: true
30+
31+
- name: Log in to the registry
32+
uses: docker/login-action@v3
33+
with:
34+
registry: ${{ env.DOCKER_REGISTRY }}
35+
username: ${{ github.actor }}
36+
password: ${{ secrets.GITHUB_TOKEN }}
37+
38+
- name: Set up metadata
39+
id: meta
40+
uses: docker/metadata-action@v5
41+
with:
42+
images: ${{ env.DOCKER_REGISTRY }}/${{ env.DOCKER_IMAGE_NAME }}
43+
flavor: |
44+
latest=false
45+
tags: |
46+
type=ref,event=branch
47+
type=ref,event=tag
48+
49+
- name: Publish image
50+
uses: docker/build-push-action@v5
51+
with:
52+
file: deploy/Dockerfile
53+
# NOTE: Uncomment to enable multi-arch builds
54+
# platforms: linux/amd64,linux/arm64
55+
push: true
56+
cache-from: type=gha
57+
cache-to: type=gha,mode=max
58+
tags: ${{ steps.meta.outputs.tags }}
59+
labels: ${{ steps.meta.outputs.labels }}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "DipDup: Attach to debugger",
6+
"type": "debugpy",
7+
"request": "attach",
8+
"connect": {
9+
"host": "localhost",
10+
// Update if you have set `DEBUGPY_PORT` to a different value
11+
"port": 5678
12+
},
13+
"justMyCode": false
14+
}
15+
]
16+
}

0 commit comments

Comments
 (0)