Skip to content

Commit

Permalink
Separate tests for master and stable
Browse files Browse the repository at this point in the history
  • Loading branch information
SchrodingersGat committed Nov 18, 2024
1 parent ba532dc commit 3a1aae5
Showing 1 changed file with 32 additions and 2 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/import_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ name: Import Dataset
on: ["push", "pull_request"]

jobs:
build:
stable:
runs-on: ubuntu-latest

env:
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_NAME: inventree_db.sqlite3
INVENTREE_DB_NAME: inventree_db_stable.sqlite3
INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static
Expand All @@ -32,3 +32,33 @@ jobs:
cd inventree
invoke migrate
invoke import-records -c -f $GITHUB_WORKSPACE/inventree_data.json
latest:
runs-on: ubuntu-latest

env:
INVENTREE_DB_ENGINE: sqlite3
INVENTREE_DB_NAME: inventree_db_latest.sqlite3
INVENTREE_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup
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

0 comments on commit 3a1aae5

Please sign in to comment.