Skip to content

Commit

Permalink
check exportability
Browse files Browse the repository at this point in the history
  • Loading branch information
jackie-pc committed Sep 11, 2023
1 parent 09fe55c commit 4b73167
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 30 deletions.
68 changes: 68 additions & 0 deletions .github/workflows/check_export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: check-export
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
list-examples:
runs-on: ubuntu-latest
outputs:
examples: ${{ steps.generate-matrix.outputs.examples }}
steps:
- uses: actions/checkout@v3
- name: Generate Matrix
id: generate-matrix
run: |
# TODO fix sales export
EXAMPLES="$(ls -1 | grep -vw sales | jq -R | jq -s -c)"
echo $EXAMPLES
echo "examples=$EXAMPLES" >> $GITHUB_OUTPUT
check-export:
needs: [list-examples]
strategy:
matrix:
example: ${{ fromJSON(needs.list-examples.outputs.examples) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
- run: |
f=${{ matrix.example }}
if [[ ! -d $f ]]; then
echo "$f is not a directory!"
exit 1
else
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
29 changes: 0 additions & 29 deletions .github/workflows/check_requirements.yml

This file was deleted.

1 change: 1 addition & 0 deletions chatroom/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions clock/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions counter/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions crm/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
4 changes: 3 additions & 1 deletion ecommerce/requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
reflex>=0.2.0
reflex>=0.2.0
icecream==2.1.1
pandas==2.1.0
1 change: 1 addition & 0 deletions fragments/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions nba/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions snakegame/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions tailwind/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions todo/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions translator/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions traversal/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions twitter/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down
1 change: 1 addition & 0 deletions upload/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
*.db
*.py[cod]
.web
__pycache__/
Expand Down

0 comments on commit 4b73167

Please sign in to comment.