Skip to content

Commit

Permalink
test: New workflow for sqlc-gen-python (sqlc-dev#2936)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
kyleconroy authored Nov 7, 2023
1 parent b7341ba commit a334908
Show file tree
Hide file tree
Showing 63 changed files with 12 additions and 1,966 deletions.
43 changes: 12 additions & 31 deletions .github/workflows/ci-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,40 +5,21 @@ on:
- main
pull_request:
jobs:

build:
name: test
runs-on: ubuntu-latest

services:
postgres:
image: postgres:11
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: postgres
ports:
- 5432:5432
# needed because the postgres container does not provide a healthcheck
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
- uses: actions/setup-go@v4
with:
python-version: 3.9
- name: Install python dependencies
working-directory: ./examples/python
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.txt
- name: Test python code
working-directory: ./examples/python
env:
PG_USER: postgres
PG_HOST: localhost
PG_DATABASE: postgres
PG_PASSWORD: postgres
PG_PORT: ${{ job.services.postgres.ports['5432'] }}
run: |
pytest src/tests
go-version: '1.21.3'
- name: install ./...
run: go install ./...
- uses: actions/checkout@v4
with:
repository: sqlc-dev/sqlc-gen-python
path: python
- run: make test
working-directory: python
- run: sqlc diff
working-directory: python/examples
5 changes: 0 additions & 5 deletions examples/python/requirements.txt

This file was deleted.

79 changes: 0 additions & 79 deletions examples/python/sqlc.json

This file was deleted.

Empty file.
12 changes: 0 additions & 12 deletions examples/python/src/authors/models.py

This file was deleted.

112 changes: 0 additions & 112 deletions examples/python/src/authors/query.py

This file was deleted.

Empty file.
30 changes: 0 additions & 30 deletions examples/python/src/booktest/models.py

This file was deleted.

Loading

0 comments on commit a334908

Please sign in to comment.