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
|
||||
- name: Coverage Tests
|
||||
run: invoke coverage
|
||||
- name: Data Import Export
|
||||
run: |
|
||||
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: Data Export Test
|
||||
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||
- name: Test Translations
|
||||
run: invoke translate
|
||||
- name: Check Migration Files
|
||||
@ -214,18 +207,10 @@ jobs:
|
||||
apt-dependency: gettext libpq-dev
|
||||
pip-dependency: psycopg2 django-redis>=5.0.0
|
||||
update: true
|
||||
|
||||
- name: Run Tests
|
||||
run: invoke test
|
||||
- name: Data Import Export
|
||||
run: |
|
||||
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
|
||||
- name: Data Export Test
|
||||
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||
|
||||
mysql:
|
||||
name: Tests - DB [MySQL]
|
||||
@ -264,15 +249,7 @@ jobs:
|
||||
apt-dependency: gettext libmysqlclient-dev
|
||||
pip-dependency: mysqlclient
|
||||
update: true
|
||||
|
||||
- name: Run Tests
|
||||
run: invoke test
|
||||
- name: Data Import Export
|
||||
run: |
|
||||
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
|
||||
- name: Data Export Test
|
||||
uses: matmair/inventree/.github/actions/migration@ci-updates
|
||||
|
Loading…
Reference in New Issue
Block a user