Skip to content

Commit

Permalink
global: enable sqlite tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ntarocco committed Sep 11, 2023
1 parent 937a8ca commit 6ce8398
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 18 deletions.
30 changes: 15 additions & 15 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
matrix:
python-version: [3.7, 3.8, 3.9]
requirements-level: [pypi]
db-service: [postgresql10, postgresql14, mysql5, mysql8]
db-service: [postgresql11, postgresql14, mysql8, sqlite]
exclude:
- python-version: 3.7
db-service: postgresql14
Expand All @@ -42,33 +42,33 @@ jobs:
requirements-level: pypi

- python-version: 3.8
db-service: postgresql10
db-service: postgresql11

- python-version: 3.9
db-service: postgresql10
db-service: postgresql11

- python-version: 3.8
db-service: mysql5
- python-version: 3.7
db-service: sqlite

- python-version: 3.9
db-service: mysql5
- python-version: 3.8
db-service: sqlite

include:
- db-service: postgresql10
DB_EXTRAS: "postgresql"
- db-service: postgresql11
EXTRAS: "tests,postgresql"

- db-service: postgresql14
DB_EXTRAS: "postgresql"

- db-service: mysql5
DB_EXTRAS: "mysql"
EXTRAS: "tests,postgresql"

- db-service: mysql8
DB_EXTRAS: "mysql"
EXTRAS: "tests,mysql"

- db-service: sqlite
EXTRAS: "tests"

env:
DB: ${{ matrix.db-service }}
EXTRAS: tests,${{ matrix.DB_EXTRAS }}
EXTRAS: ${{ matrix.EXTRAS }}
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ docs/.doctrees/
target/

# Tests
tests/test.db
test.db

# Vim swapfiles
.*.sw?
6 changes: 5 additions & 1 deletion run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ trap cleanup EXIT

python -m check_manifest
python -m sphinx.cmd.build -qnNW docs docs/_build/html
eval "$(docker-services-cli up --db ${DB:-postgresql} --env)"

# run docker services only when not SQLite
if [[ "${DB:-}" != "sqlite" ]]; then
eval "$(docker-services-cli up --db ${DB:-postgresql} --env)"
fi
python -m pytest
tests_exit_code=$?
exit "$tests_exit_code"
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ install_requires =

[options.extras_require]
tests =
pytest-black>=0.3.0,<0.3.10
pytest-black>=0.3.0
cryptography>=2.1.4
pytest-invenio>=1.4.5
Sphinx>=4.5.0
Expand Down

0 comments on commit 6ce8398

Please sign in to comment.