Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
87 additions
and
38 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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
[run] | ||
include = */shoobx/immutable/* | ||
omit = */test* | ||
|
||
relative_files = True |
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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: shoobx.immutable | ||
|
||
on: | ||
push: | ||
pull_request: | ||
schedule: | ||
- cron: '0 12 * * 0' # run once a week on Sunday | ||
workflow_dispatch: | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
services: | ||
postgres: | ||
image: | ||
bitnami/postgresql:latest | ||
env: | ||
# not messing with the default postgres user and database | ||
# POSTGRESQL_USERNAME: postgres | ||
POSTGRESQL_PASSWORD: postgres_password | ||
# POSTGRESQL_DATABASE: postgres | ||
POSTGRESQL_EXTRA_FLAGS: -c max_prepared_transactions=10 | ||
ports: | ||
- 5432:5432 | ||
|
||
strategy: | ||
matrix: | ||
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11'] | ||
|
||
steps: | ||
|
||
- name: Check out source | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install PostgreSQL client | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install --yes postgresql-client | ||
- name: Postgres preparations | ||
run: | | ||
# host is localhost because we connected postgres via 5432:5432 at services.postgres.ports | ||
# wait for postgresql here | ||
timeout 90s bash -c "until pg_isready -h localhost -U postgres ; do sleep 2 ; done" | ||
# create the test database | ||
psql -h localhost -d postgres -U postgres -c "create user pjpersist with createdb password 'pjpersist';" | ||
env: | ||
# postgres password is required | ||
PGPASSWORD: postgres_password | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install tox tox-gh-actions | ||
- name: Test with tox | ||
run: tox | ||
- name: Coveralls | ||
uses: AndreMiras/coveralls-python-action@develop | ||
if: matrix.python-version == 3.11 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} |
This file was deleted.
Oops, something went wrong.
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
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
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
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,23 +1,18 @@ | ||
[tox] | ||
envlist = py37 | ||
envlist = py37, py38, py39, py310, py311 | ||
|
||
[testenv] | ||
commands = | ||
zope-testrunner -vpc1 --all --test-path ./src | ||
pip_pre = True | ||
deps = | ||
.[test] | ||
[gh-actions] | ||
python = | ||
3.7: py37 | ||
3.8: py38 | ||
3.9: py39 | ||
3.10: py310 | ||
3.11: py311 | ||
|
||
[testenv:py37] | ||
# Python 3.7 is the designated coverage report run. | ||
basepython = python3.7 | ||
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH | ||
[testenv] | ||
commands = | ||
coverage erase | ||
coverage run {envbindir}/zope-testrunner -vpc1 --all --test-path ./src | ||
coverage run {envbindir}/zope-testrunner -vvc1 --all --test-path ./src | ||
coverage xml | ||
coverage report -m | ||
pip_pre = True | ||
deps = | ||
{[testenv]deps} | ||
coverage | ||
.[test] |