Skip to content

Update snakegame to pass pyright #370

Update snakegame to pass pyright

Update snakegame to pass pyright #370

Workflow file for this run

name: app-harness
env:
REFLEX_DEP: 'reflex'
TELEMETRY_ENABLED: false
APP_HARNESS_HEADLESS: 1
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
inputs:
reflex_dep:
description: 'Reflex dep (raw pip spec)'
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 '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt -r requirements-dev.txt
playwright install --with-deps
reflex init
pytest tests -vv