Skip to content
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

Address tests #2

Merged
merged 5 commits into from
Feb 22, 2024
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
42 changes: 22 additions & 20 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ jobs:
name: Python ${{ matrix.python-version }} sample
strategy:
matrix:
python-version: [3.10, 3.11, 3.12, 'pypy-3.9']
continue-on-error: false
python-version: ['3.10', '3.11', '3.12', 'pypy-3.9']
continue-on-error: true
services:
database:
image: postgres:12
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
Expand All @@ -27,27 +27,29 @@ jobs:
DJANGO_DATABASE_NAME: postgres

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Depedencies
- uses: actions/checkout@v4
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Install python dependencies
run: |
python -m pip install wheel
python -m pip install pytest pytest-django pytest-cov psycopg2-binary
python setup.py develop
poetry install --sync --no-interaction --no-root --with test
poetry run pip install -e .

- name: Run tests
run: >-
pytest -v -x
--cov=django_ltree
--junitxml=junit/test-results-${{ matrix.python-version }}.xml
tests/
run: |
poetry run pytest -v -x tests/

- name: Upload pytest test results
uses: actions/upload-artifact@v2
with:
name: pytest-results-${{ matrix.python-version }}
path: junit/test-results-${{ matrix.python-version }}.xml
if: ${{ always() }}
# - name: Upload pytest test results
# uses: actions/upload-artifact@v2
# with:
# name: pytest-results-${{ matrix.python-version }}
# path: junit/test-results-${{ matrix.python-version }}.xml
# if: ${{ always() }}
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ python = ">=3.10"
django = ">=5.0.2"
psycopg = ">=3.1.18"


[tool.poetry.group.test.dependencies]
pytest = "^8.0.1"
pytest-django = "^4.8.0"
Expand Down
Loading