Skip to content

check exportability

check exportability #6

Workflow file for this run

name: check-export
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
check-export:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- run: |
for f in $(ls -1); do
if [[ -d $f ]]; then
if [[ ! -f $f/requirements.txt ]]; then
echo "$f/requirements.txt is MISSING"
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
popd
fi
done