-
Notifications
You must be signed in to change notification settings - Fork 1.2k
83 lines (74 loc) · 2.57 KB
/
integration_tests_wsl.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: integration-tests-wsl
on:
push:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
pull_request:
branches: [ main ]
paths-ignore:
- '**/*.md'
permissions:
contents: read
env:
TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096"
jobs:
example-counter-wsl:
timeout-minutes: 30
# 2019 is more stable with WSL in GH actions
# https://github.com/actions/runner-images/issues/5151
# Confirmed through trial and error. 2022 has >80% failure rate (probably BSOD)
runs-on: windows-2019
steps:
- uses: actions/checkout@v4
- name: Clone Reflex Examples Repo
uses: actions/checkout@v4
with:
repository: reflex-dev/reflex-examples
path: reflex-examples
- uses: Vampire/setup-wsl@v2
- name: Install Python
shell: wsl-bash {0}
run: |
apt update
apt install -y python3 python3-pip curl dos2unix zip unzip
- name: Install Poetry
shell: wsl-bash {0}
run: |
curl -sSL https://install.python-poetry.org | python3 -
# Symlink seems easier to make work than persisting PATH changes, in WSL
ln -s /root/.local/bin/poetry /usr/local/bin/poetry
- name: Install reflex deps
shell: wsl-bash {0}
run: |
poetry install
- name: Install requirements for counter example
working-directory: ./reflex-examples/counter
shell: wsl-bash {0}
run: |
poetry run pip install -r requirements.txt
- name: Check export --backend-only before init for counter example
working-directory: ./reflex-examples/counter
shell: wsl-bash {0}
run: |
poetry run reflex export --backend-only
- name: Check run --backend-only before init for counter example
shell: wsl-bash {0}
run: |
dos2unix scripts/integration.sh
poetry run bash scripts/integration.sh ./reflex-examples/counter dev 8001 --backend-only --backend-port 8001
- name: Init Website for counter example
working-directory: ./reflex-examples/counter
shell: wsl-bash {0}
run: |
poetry run reflex init --loglevel debug
- name: Check export for counter example
working-directory: ./reflex-examples/counter
shell: wsl-bash {0}
run: |
poetry run reflex export --frontend-only --loglevel debug
- name: Run Website and Check for errors
shell: wsl-bash {0}
run: |
poetry run bash scripts/integration.sh ./reflex-examples/counter dev