mirror of
https://github.com/inventree/demo-dataset.git
synced 2025-04-28 05:26:49 +00:00
34 lines
961 B
YAML
34 lines
961 B
YAML
name: Import Dataset
|
|
|
|
on: ["push", "pull_request"]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
INVENTREE_DB_ENGINE: sqlite3
|
|
INVENTREE_DB_NAME: inventree_db.sqlite3
|
|
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
|
|
INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v2
|
|
- name: Setup Python
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: 3.9
|
|
- 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
|
|
run: |
|
|
cd inventree
|
|
invoke migrate
|
|
invoke import-records -c -f $GITHUB_WORKSPACE/inventree_data.json
|