-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move project's dependency management to pipenv - closes #701
- Loading branch information
Showing
27 changed files
with
468 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,17 +3,16 @@ name: Run linters | |
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**.py' | ||
- .github/workflows/linters.yml | ||
- requirements-lint.txt | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
||
jobs: | ||
lint: | ||
uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v1.3.2 | ||
uses: fizyk/actions-reuse/.github/workflows/linters-python.yml@v1.7.1 | ||
with: | ||
pipenv: true | ||
pipenv-install-options: "--skip-lock" | ||
mypy: true | ||
pycodestyle: false | ||
flake8: | ||
|
@@ -23,36 +22,32 @@ jobs: | |
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
- name: Run flake8 checker | ||
uses: fizyk/actions-reuse/.github/actions/[email protected] | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-lint.txt | ||
- name: Run flake8 | ||
run: | | ||
flake8 src/ tests/ | ||
python-version: ${{ matrix.python-version }} | ||
pipenv-install-options: "--skip-lock" | ||
command: flake8 pytest_postgresql/ tests/ | ||
|
||
|
||
imports: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test.txt | ||
- name: Check if the code can be imported without psycopg | ||
run: | | ||
python -c "import pytest_postgresql" | ||
python -c "import pytest_postgresql.plugin" | ||
python -c "import pytest_postgresql.factories" | ||
python -c "import pytest_postgresql.factories.client" | ||
python -c "import pytest_postgresql.factories.noprocess" | ||
python -c "import pytest_postgresql.factories.process" | ||
python -c "import pytest_postgresql.janitor" | ||
# imports: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Set up Python 3.11 | ||
# uses: actions/setup-python@v4 | ||
# with: | ||
# python-version: "3.11" | ||
# - name: Install dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install -r requirements-test.txt | ||
# - name: Check if the code can be imported without psycopg | ||
# run: | | ||
# python -c "import pytest_postgresql" | ||
# python -c "import pytest_postgresql.plugin" | ||
# python -c "import pytest_postgresql.factories" | ||
# python -c "import pytest_postgresql.factories.client" | ||
# python -c "import pytest_postgresql.factories.noprocess" | ||
# python -c "import pytest_postgresql.factories.process" | ||
# python -c "import pytest_postgresql.janitor" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,18 +3,8 @@ name: Run tests on macos | |
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**.py' | ||
- .github/workflows/tests-macos.yml | ||
- requirements-test.txt | ||
- requirements-test-withpsycopg.txt | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '**.py' | ||
- .github/workflows/tests-macos.yml | ||
- requirements-test.txt | ||
- requirements-test-withpsycopg.txt | ||
|
||
jobs: | ||
macostests: | ||
|
@@ -41,16 +31,12 @@ jobs: | |
- name: Check installed locales | ||
run: | | ||
locale -a | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test-withpsycopg.txt | ||
- name: Install dependencies | ||
run: | | ||
echo "TMPDIR=$TMPDIR" >> $GITHUB_ENV | ||
- name: Run test | ||
run: | | ||
py.test -n 0 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml | ||
uses: fizyk/actions-reuse/.github/actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
pipenv-install-options: "--skip-lock" | ||
command: py.test -n 0 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,6 @@ name: Run tests | |
on: | ||
push: | ||
branches: [ main ] | ||
paths: | ||
- '**.py' | ||
- .github/workflows/tests.yml | ||
- requirements-test.txt | ||
- requirements-test-withpsycopg.txt | ||
pull_request: | ||
branches: [ main ] | ||
|
||
|
@@ -62,24 +57,30 @@ jobs: | |
run: | | ||
locale -a | ||
sudo locale-gen de_DE.UTF-8 | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install -r requirements-test-withpsycopg.txt | ||
- name: Run test | ||
run: | | ||
py.test -n 0 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml | ||
uses: fizyk/actions-reuse/.github/actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
pipenv-install-options: "--skip-lock" | ||
command: py.test -n 0 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml | ||
- name: Run xdist test | ||
run: | | ||
py.test -n 1 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml | ||
uses: fizyk/actions-reuse/.github/actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
pipenv-install-options: "--skip-lock" | ||
command: py.test -n 1 --postgresql-exec="/usr/lib/postgresql/${{ matrix.postgres-version }}/bin/pg_ctl" -k "not docker" --cov-report=xml:coverage-xdist.xml | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: postgresql-${{ matrix.python-version }}-${{ matrix.postgres-version }} | ||
path: /tmp/pytest-of-runner/** | ||
- name: Run test noproc fixture on docker | ||
run: | | ||
pytest -n 0 -k docker --postgresql-host=localhost --postgresql-port 5433 --postgresql-password=postgres --cov-report=xml:coverage-docker.xml | ||
uses: fizyk/actions-reuse/.github/actions/[email protected] | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
pipenv-install-options: "--skip-lock" | ||
command: pytest -n 0 -k docker --postgresql-host=localhost --postgresql-port 5433 --postgresql-password=postgres --cov-report=xml:coverage-docker.xml | ||
- name: Upload coverage to Codecov | ||
uses: codecov/[email protected] | ||
with: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
include *.rst *.py | ||
include src/pytest_postgresql/py.typed | ||
recursive-include src/pytest_postgresql *.py | ||
include pytest_postgresql/py.typed | ||
recursive-include pytest_postgresql *.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.