From ccc1cbea4ce92765fa93bdc7b3fc64558ec60150 Mon Sep 17 00:00:00 2001 From: Jackie Tung Date: Mon, 11 Sep 2023 10:19:45 -0700 Subject: [PATCH] test the zip files --- .github/workflows/check_export.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/check_export.yml b/.github/workflows/check_export.yml index 4b0e9807..5481cf6d 100644 --- a/.github/workflows/check_export.yml +++ b/.github/workflows/check_export.yml @@ -19,20 +19,30 @@ jobs: exit 1 fi pushd $f + + if !( grep -w "^reflex" requirements.txt >/dev/null 2>&1 ); then + echo "$f/requirements.txt does not contain 'reflex'" + exit 1 + fi + python -m venv venv source venv/bin/activate + # pin reflex version - no moving target pip install reflex==0.2.7 pip install -r requirements.txt reflex init reflex export + for a in frontend.zip backend.zip; do + if unzip -t "$a"; then + echo "$a prepared as expected" + else + echo "ERROR: $a is not a valid zip file" + exit 1 + fi + done + deactivate - if ls frontend.zip backend.zip; then - echo "Archives prepared as expected" - else - echo "ERROR: Archives not prepared as expected" - exit 1 - fi popd fi done