-
Notifications
You must be signed in to change notification settings - Fork 359
56 lines (51 loc) · 1.56 KB
/
app_harness.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
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