mirror of
https://github.com/inventree/InvenTree
synced 2024-08-30 18:33:04 +00:00
refactor import export tests
This commit is contained in:
parent
4ffad66191
commit
f35d618b6b
17
.github/actions/migration/action.yaml
vendored
Normal file
17
.github/actions/migration/action.yaml
vendored
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
name: 'Migration test'
|
||||||
|
description: 'Run migration test sequenze'
|
||||||
|
author: 'inventree'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: 'composite'
|
||||||
|
steps:
|
||||||
|
- name: Data Import Export
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
invoke migrate
|
||||||
|
invoke import-fixtures
|
||||||
|
invoke export-records -f data.json
|
||||||
|
python3 ./InvenTree/manage.py flush --noinput
|
||||||
|
invoke migrate
|
||||||
|
invoke import-records -f data.json
|
||||||
|
invoke import-records -f data.json
|
35
.github/workflows/qc_checks.yaml
vendored
35
.github/workflows/qc_checks.yaml
vendored
@ -159,15 +159,8 @@ jobs:
|
|||||||
update: true
|
update: true
|
||||||
- name: Coverage Tests
|
- name: Coverage Tests
|
||||||
run: invoke coverage
|
run: invoke coverage
|
||||||
- name: Data Import Export
|
- name: Data Export Test
|
||||||
run: |
|
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||||
invoke migrate
|
|
||||||
invoke import-fixtures
|
|
||||||
invoke export-records -f data.json
|
|
||||||
rm inventree.sqlite
|
|
||||||
invoke migrate
|
|
||||||
invoke import-records -f data.json
|
|
||||||
invoke import-records -f data.json
|
|
||||||
- name: Test Translations
|
- name: Test Translations
|
||||||
run: invoke translate
|
run: invoke translate
|
||||||
- name: Check Migration Files
|
- name: Check Migration Files
|
||||||
@ -214,18 +207,10 @@ jobs:
|
|||||||
apt-dependency: gettext libpq-dev
|
apt-dependency: gettext libpq-dev
|
||||||
pip-dependency: psycopg2 django-redis>=5.0.0
|
pip-dependency: psycopg2 django-redis>=5.0.0
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: invoke test
|
run: invoke test
|
||||||
- name: Data Import Export
|
- name: Data Export Test
|
||||||
run: |
|
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||||
invoke migrate
|
|
||||||
python3 ./InvenTree/manage.py flush --noinput
|
|
||||||
invoke import-fixtures
|
|
||||||
invoke export-records -f data.json
|
|
||||||
python3 ./InvenTree/manage.py flush --noinput
|
|
||||||
invoke import-records -f data.json
|
|
||||||
invoke import-records -f data.json
|
|
||||||
|
|
||||||
mysql:
|
mysql:
|
||||||
name: Tests - DB [MySQL]
|
name: Tests - DB [MySQL]
|
||||||
@ -264,15 +249,7 @@ jobs:
|
|||||||
apt-dependency: gettext libmysqlclient-dev
|
apt-dependency: gettext libmysqlclient-dev
|
||||||
pip-dependency: mysqlclient
|
pip-dependency: mysqlclient
|
||||||
update: true
|
update: true
|
||||||
|
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: invoke test
|
run: invoke test
|
||||||
- name: Data Import Export
|
- name: Data Export Test
|
||||||
run: |
|
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||||
invoke migrate
|
|
||||||
python3 ./InvenTree/manage.py flush --noinput
|
|
||||||
invoke import-fixtures
|
|
||||||
invoke export-records -f data.json
|
|
||||||
python3 ./InvenTree/manage.py flush --noinput
|
|
||||||
invoke import-records -f data.json
|
|
||||||
invoke import-records -f data.json
|
|
||||||
|
Loading…
Reference in New Issue
Block a user