Add ci.yml

This commit is contained in:
Jeremy Stretch 2020-12-08 13:51:42 -05:00
parent e7f64334c0
commit 142020512a
2 changed files with 41 additions and 2 deletions

39
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,39 @@
name: CI Testing
on: push
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7]
services:
redis:
image: redis
ports:
- 6379:6379
postgres:
image: postgres
env:
POSTGRES_USER: netbox
POSTGRES_PASSWORD: netbox
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Check out repo
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pycodestyle coverage
- name: Run build script
run: ./scripts/cibuild.sh

View File

@ -7,8 +7,8 @@ ALLOWED_HOSTS = ['*']
DATABASE = {
'NAME': 'netbox',
'USER': '',
'PASSWORD': '',
'USER': 'netbox',
'PASSWORD': 'netbox',
'HOST': 'localhost',
'PORT': '',
'CONN_MAX_AGE': 300,