2
0
mirror of https://github.com/inventree/InvenTree.git synced 2025-06-13 10:35:40 +00:00

Use env variables rather than custom ci scripts

This commit is contained in:
Oliver Walters
2021-03-31 20:39:22 +11:00
parent 608f47837f
commit c846e2e65a
7 changed files with 78 additions and 104 deletions

View File

@ -1,6 +1,6 @@
# Perform CI checks, and calculate code coverage
name: Code Coverage
name: SQLite
on: ["push", "pull_request"]
@ -10,10 +10,11 @@ jobs:
# These tests are used for code coverage analysis
coverage:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
INVENTREE_DB_NAME: './test_db.sqlite'
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_ENGINE: django.db.backends.sqlite3
steps:
- name: Checkout Code

View File

@ -7,6 +7,15 @@ jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.mysql
INVENTREE_DB_USER: root
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 3306
services:
mariadb:
image: mariadb:latest
@ -32,6 +41,6 @@ jobs:
pip3 install mysqlclient
invoke install
- name: Run Tests
run: |
cd InvenTree
python3 manage.py test --settings=InvenTree.ci_mysql
run: |
cd InvenTree
python3 manage.py test --settings=InvenTree.ci_mysql

View File

@ -9,6 +9,14 @@ jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.mysql
INVENTREE_DB_USER: root
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 3306
services:
mysql:
image: mysql:latest

View File

@ -9,6 +9,15 @@ jobs:
test:
runs-on: ubuntu-latest
env:
# Database backend configuration
INVENTREE_DB_ENGINE: django.db.backends.postgresql
INVENTREE_DB_USER: inventree
INVENTREE_DB_PASSWORD: password
INVENTREE_DB_HOST: '127.0.0.1'
INVENTREE_DB_PORT: 5432
services:
postgres:
image: postgres