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

Check data against stable branch (#84)
Some checks failed
Import Dataset / stable (push) Has been cancelled
Import Dataset / latest (push) Has been cancelled

* Check data against stable branch

* Separate tests for master and stable

* Ensure each allocation has a shipment
This commit is contained in:
Oliver 2024-11-19 00:54:23 +11:00 committed by GitHub
parent 6d9621595e
commit b545c12e5a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 94 additions and 14 deletions

View File

@ -3,12 +3,42 @@ name: Import Dataset
on: ["push", "pull_request"] on: ["push", "pull_request"]
jobs: jobs:
build: stable:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env: env:
INVENTREE_DB_ENGINE: sqlite3 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
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 -b stable
cd inventree
invoke install
- name: Import Database Records
run: |
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_BACKUP_DIR: $GITHUB_WORKSPACE/path/to/backup
INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media INVENTREE_MEDIA_ROOT: $GITHUB_WORKSPACE/path/to/media
INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static INVENTREE_STATIC_ROOT: $GITHUB_WORKSPACE/path/to/static

View File

@ -45471,7 +45471,7 @@
"part": 74, "part": 74,
"sale_price_currency": "USD", "sale_price_currency": "USD",
"sale_price": "12.450000", "sale_price": "12.450000",
"shipped": "0.00000" "shipped": "1.00000"
} }
}, },
{ {
@ -46430,7 +46430,7 @@
"pk": 91, "pk": 91,
"fields": { "fields": {
"line": 27, "line": 27,
"shipment": null, "shipment": 12,
"item": 1286, "item": 1286,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -46440,7 +46440,7 @@
"pk": 92, "pk": 92,
"fields": { "fields": {
"line": 27, "line": 27,
"shipment": null, "shipment": 14,
"item": 1294, "item": 1294,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -46450,7 +46450,7 @@
"pk": 93, "pk": 93,
"fields": { "fields": {
"line": 27, "line": 27,
"shipment": null, "shipment": 12,
"item": 1295, "item": 1295,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -46460,7 +46460,7 @@
"pk": 94, "pk": 94,
"fields": { "fields": {
"line": 29, "line": 29,
"shipment": null, "shipment": 7,
"item": 1288, "item": 1288,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -46470,7 +46470,7 @@
"pk": 95, "pk": 95,
"fields": { "fields": {
"line": 29, "line": 29,
"shipment": null, "shipment": 13,
"item": 1287, "item": 1287,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -46480,7 +46480,7 @@
"pk": 96, "pk": 96,
"fields": { "fields": {
"line": 29, "line": 29,
"shipment": null, "shipment": 7,
"item": 1289, "item": 1289,
"quantity": "1.00000" "quantity": "1.00000"
} }
@ -88981,7 +88981,7 @@
"pk": 1, "pk": 1,
"fields": { "fields": {
"password": "pbkdf2_sha256$600000$eW6hr1msXY3U1vkqy3K4wd$/egntyTaLBCUPnM1nM2LIbbDGjKfccvIOgexovlFKjo=", "password": "pbkdf2_sha256$600000$eW6hr1msXY3U1vkqy3K4wd$/egntyTaLBCUPnM1nM2LIbbDGjKfccvIOgexovlFKjo=",
"last_login": "2024-11-08T13:41:20.839Z", "last_login": "2024-11-18T13:48:17.277Z",
"is_superuser": true, "is_superuser": true,
"username": "admin", "username": "admin",
"first_name": "", "first_name": "",
@ -115051,6 +115051,24 @@
} }
} }
}, },
{
"model": "stock.stockitemtracking",
"pk": 1391,
"fields": {
"tracking_type": 60,
"item": 1287,
"date": "2024-11-18T13:50:05.056Z",
"notes": null,
"user": [
"admin"
],
"deltas": {
"customer": 34,
"salesorder": 8,
"customer_name": "Customer D"
}
}
},
{ {
"model": "stock.stockitem", "model": "stock.stockitem",
"pk": 2, "pk": 2,
@ -164545,14 +164563,14 @@
"notes": null, "notes": null,
"barcode_data": "", "barcode_data": "",
"barcode_hash": "", "barcode_hash": "",
"updated": "2024-07-27T05:10:45.490Z", "updated": "2024-11-18T13:50:05.052Z",
"parent": null, "parent": null,
"part": 74, "part": 74,
"supplier_part": null, "supplier_part": null,
"location": 14, "location": null,
"packaging": "", "packaging": "",
"belongs_to": null, "belongs_to": null,
"customer": null, "customer": 34,
"serial": "162", "serial": "162",
"serial_int": 162, "serial_int": 162,
"link": "", "link": "",
@ -164562,7 +164580,7 @@
"consumed_by": null, "consumed_by": null,
"is_building": false, "is_building": false,
"purchase_order": null, "purchase_order": null,
"sales_order": null, "sales_order": 8,
"expiry_date": null, "expiry_date": null,
"stocktake_date": null, "stocktake_date": null,
"stocktake_user": null, "stocktake_user": null,
@ -204135,6 +204153,38 @@
"link": "" "link": ""
} }
}, },
{
"model": "order.salesordershipment",
"pk": 13,
"fields": {
"metadata": {},
"notes": null,
"order": 8,
"shipment_date": "2024-11-18",
"delivery_date": null,
"checked_by": null,
"reference": "2",
"tracking_number": "TRK-0001",
"invoice_number": "",
"link": "https://shipping.co/track-123"
}
},
{
"model": "order.salesordershipment",
"pk": 14,
"fields": {
"metadata": {},
"notes": null,
"order": 11,
"shipment_date": null,
"delivery_date": null,
"checked_by": null,
"reference": "SHIP-ABC",
"tracking_number": "TRK-XYZ",
"invoice_number": "INV-123",
"link": ""
}
},
{ {
"model": "order.salesorder", "model": "order.salesorder",
"pk": 1, "pk": 1,