lib.itmens/.github/workflows/tests.yml

56 lines
1.3 KiB
YAML
Raw Normal View History

2023-07-20 21:59:49 -04:00
name: tests
2022-12-16 09:53:06 -05:00
on:
push:
pull_request:
branches: [ "main" ]
jobs:
2023-07-20 21:59:49 -04:00
django:
2022-12-16 09:53:06 -05:00
runs-on: ubuntu-latest
services:
2023-05-22 20:14:14 -04:00
redis:
image: redis
ports:
- 6379:6379
2022-12-16 09:53:06 -05:00
db:
2023-07-20 21:59:49 -04:00
image: postgres
2022-12-16 09:53:06 -05:00
env:
2023-07-20 21:59:49 -04:00
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: test_neodb
2022-12-16 09:53:06 -05:00
ports:
- 5432:5432
2023-07-20 21:59:49 -04:00
db2:
image: postgres
env:
POSTGRES_USER: testuser
POSTGRES_PASSWORD: testpass
POSTGRES_DB: test_neodb_takahe
ports:
- 15432:5432
2022-12-16 09:53:06 -05:00
strategy:
max-parallel: 4
matrix:
2023-07-20 21:59:49 -04:00
python-version: ['3.11']
2022-12-16 09:53:06 -05:00
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
2023-08-11 01:43:19 -04:00
uses: actions/setup-python@v4
2022-12-16 09:53:06 -05:00
with:
python-version: ${{ matrix.python-version }}
2023-08-11 01:43:19 -04:00
cache: pip
2022-12-16 09:53:06 -05:00
- name: Install Dependencies
run: |
pip install -r requirements.txt
- name: Run Tests
2023-09-25 19:47:46 +00:00
env:
NEODB_DB_URL: postgres://testuser:testpass@127.0.0.1/test_neodb
TAKAHE_DB_URL: postgres://testuser:testpass@127.0.0.1/test_neodb_takahe
NEODB_REDIS_URL: redis://127.0.0.1:6379/0
NEODB_SITE_NAME: test
NEODB_SITE_DOMAIN: test.domain
NEODB_SECRET_KEY: test
2022-12-16 09:53:06 -05:00
run: |
2023-01-11 09:26:58 -05:00
python manage.py test