2
0
mirror of https://github.com/inventree/demo-dataset.git synced 2025-04-27 21:16:50 +00:00

Merge pull request #1 from inventree/github-actions

Github action for importing data
This commit is contained in:
Oliver 2021-06-20 11:05:30 +10:00 committed by GitHub
commit 1996096595
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 45 additions and 2 deletions

35
.github/workflows/import_data.yaml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Import Dataset
on: ["push", "pull_request"]
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python-version: [3.7]
env:
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_NAME: inventree_db.sqlite3
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
steps:
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install InvenTree
run: |
sudo apt-get install python3-dev python3-pip python3-venv python3-wheel g++
pip3 install invoke
git clone --depth 1 https://github.com/inventree/inventree inventree
cd inventree
invoke install
- name: Import Database Records
cd inventree
invoke import-records -f $GITHUB_WORKSPACE/inventree_data.json

View File

@ -1,2 +1,7 @@
# demo-dataset
Dataset for the InvenTree demo website
# InvenTree Demo Dataset
This repository contains demo data for the [InvenTree project](https://inventree.readthedocs.io).
The demo dataset can be used to populate an InvenTree database for demonstration purposes. It may also be useful if you are developing and/or testing new features for InvenTree.
To setup InvenTree with this dataset, refer to the [InvenTree Instructions](https://inventree.readthedocs.io/en/latest/start/demo/).

3
inventree_data.json Normal file
View File

@ -0,0 +1,3 @@
{
}