From 4f9898fba518008e9d44e215a071f876d0818f90 Mon Sep 17 00:00:00 2001 From: Oliver Walters Date: Sun, 25 Apr 2021 10:30:31 +1000 Subject: [PATCH] Test import / export for MySQL and PostgreSQL --- .github/workflows/mysql.yaml | 9 ++++++++- .github/workflows/postgresql.yaml | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.github/workflows/mysql.yaml b/.github/workflows/mysql.yaml index 70acad66a1..58a5c80388 100644 --- a/.github/workflows/mysql.yaml +++ b/.github/workflows/mysql.yaml @@ -48,4 +48,11 @@ jobs: pip3 install mysqlclient invoke install - name: Run Tests - run: invoke test \ No newline at end of file + run: invoke test + - name: Data Import Export + run: | + 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 \ No newline at end of file diff --git a/.github/workflows/postgresql.yaml b/.github/workflows/postgresql.yaml index 76981e5a1b..8f86d2c219 100644 --- a/.github/workflows/postgresql.yaml +++ b/.github/workflows/postgresql.yaml @@ -44,4 +44,11 @@ jobs: pip3 install psycopg2 invoke install - name: Run Tests - run: invoke test \ No newline at end of file + run: invoke test + - name: Data Import Export + run: | + 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 \ No newline at end of file