add threejs_demo #56
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: app-harness | |
env: | |
REFLEX_VERSION: "==0.3.2" | |
TELEMETRY_ENABLED: false | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
workflow_dispatch: | |
inputs: | |
reflex_version: | |
description: "Reflex version" | |
jobs: | |
list-examples-with-tests: | |
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 | |
# TODO fix stable_diffusion export (gets stuck) | |
EXAMPLES="$(find . -name 'tests' -type d | sort | grep -vw -E 'node_modules|site-packages' | cut -f2 -d/ | uniq | jq -R | jq -s -c)" | |
echo $EXAMPLES | |
echo "examples=$EXAMPLES" >> $GITHUB_OUTPUT | |
run-tests: | |
needs: [list-examples-with-tests] | |
strategy: | |
matrix: | |
example: ${{ fromJSON(needs.list-examples-with-tests.outputs.examples) }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v3 | |
- run: | | |
f=${{ matrix.example }} | |
cd "$f" | |
if [[ ! -f requirements-dev.txt ]]; then | |
echo "requirements-dev.txt is MISSING" | |
exit 1 | |
fi | |
python -m venv venv | |
source venv/bin/activate | |
pip install 'reflex${{ github.event.inputs.reflex_version || env.REFLEX_VERSION }}' -r requirements.txt -r requirements-dev.txt | |
reflex init | |
pytest tests -vv |