Skip to content

test: New workflow for sqlc-gen-python #2936

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Nov 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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