Skip to content

update version to patch #259

update version to patch

update version to patch #259

name: Test orm-django
on:
push:
# Run for all branches excluding dependabot branches. Do NOT run for tags.
branches-ignore:
- "dependabot/**"
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: '3.11.5'
- name: Install poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
- name: Install dependencies
run: |
cd examples/django-encryption-example && poetry install && cd -
cd sdk/orm-django && poetry install && cd -
pip install tox
- name: Run vault
run: |
docker run --rm --init \
--name pvault-dev \
-p 8123:8123 \
-e PVAULT_SERVICE_LICENSE=${{ secrets.PVAULT_SERVICE_LICENSE }} \
-e PVAULT_SENTRY_ENABLE=true \
-e PVAULT_LOG_CUSTOMER_IDENTIFIER="piiano" \
-e PVAULT_LOG_CUSTOMER_ENV="SDK" \
-d \
piiano/pvault-dev:latest
sleep 10
# Runs vault with dev mode and set it a custom customer identifier/env for testing purposes.
- name: Run migrations
run: |
poetry run python3 manage.py makemigrations && poetry run python3 manage.py migrate
working-directory: ./sdk/orm-django
- name: Test plugin
run: |
# we cant run poetry shell in this env so we need to run the tests with poetry run.
# See discussion: https://github.com/python-poetry/poetry/discussions/3526
tox
working-directory: ./sdk/orm-django
- name: Test django-encryption-example
run: |
cp ./vault_sample_django/local_settings_example.py ./vault_sample_django/local_settings.py
poetry run python3 manage.py test
working-directory: ./examples/django-encryption-example