Skip to content

Commit a334908

Browse files
authored
test: New workflow for sqlc-gen-python (#2936)
* test: New workflow for sqlc-gen-python * fix workflow * Run diff in the python examples * docs: Remove Python examples They now live in sqlc-gen-python * test: Remove all python tests They've been ported to the Python repository
1 parent b7341ba commit a334908

File tree

63 files changed

+12
-1966
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+12
-1966
lines changed

.github/workflows/ci-python.yml

Lines changed: 12 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,40 +5,21 @@ on:
55
- main
66
pull_request:
77
jobs:
8-
98
build:
109
name: test
1110
runs-on: ubuntu-latest
12-
13-
services:
14-
postgres:
15-
image: postgres:11
16-
env:
17-
POSTGRES_USER: postgres
18-
POSTGRES_PASSWORD: postgres
19-
POSTGRES_DB: postgres
20-
ports:
21-
- 5432:5432
22-
# needed because the postgres container does not provide a healthcheck
23-
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
24-
2511
steps:
2612
- uses: actions/checkout@v4
27-
- uses: actions/setup-python@v4
13+
- uses: actions/setup-go@v4
2814
with:
29-
python-version: 3.9
30-
- name: Install python dependencies
31-
working-directory: ./examples/python
32-
run: |
33-
python -m pip install --upgrade pip
34-
python -m pip install -r requirements.txt
35-
- name: Test python code
36-
working-directory: ./examples/python
37-
env:
38-
PG_USER: postgres
39-
PG_HOST: localhost
40-
PG_DATABASE: postgres
41-
PG_PASSWORD: postgres
42-
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
43-
run: |
44-
pytest src/tests
15+
go-version: '1.21.3'
16+
- name: install ./...
17+
run: go install ./...
18+
- uses: actions/checkout@v4
19+
with:
20+
repository: sqlc-dev/sqlc-gen-python
21+
path: python
22+
- run: make test
23+
working-directory: python
24+
- run: sqlc diff
25+
working-directory: python/examples

examples/python/requirements.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

examples/python/sqlc.json

Lines changed: 0 additions & 79 deletions
This file was deleted.

examples/python/src/authors/__init__.py

Whitespace-only changes.

examples/python/src/authors/models.py

Lines changed: 0 additions & 12 deletions
This file was deleted.

examples/python/src/authors/query.py

Lines changed: 0 additions & 112 deletions
This file was deleted.

examples/python/src/booktest/__init__.py

Whitespace-only changes.

examples/python/src/booktest/models.py

Lines changed: 0 additions & 30 deletions
This file was deleted.

0 commit comments

Comments
 (0)