CI: Basic integration test for WSL (#1510)
This commit is contained in:
parent
9222bbbdf2
commit
c452ec774d
78
.github/workflows/integration_tests_wsl.yml
vendored
Normal file
78
.github/workflows/integration_tests_wsl.yml
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
name: integration-tests-wsl
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
pull_request:
|
||||
branches: [ main ]
|
||||
paths-ignore:
|
||||
- '**/*.md'
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
example-counter-wsl:
|
||||
# 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@v3
|
||||
- name: Clone Reflex Examples Repo
|
||||
uses: actions/checkout@v3
|
||||
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
|
@ -103,7 +103,7 @@ def run_backend(
|
||||
"--port",
|
||||
str(port),
|
||||
"--log-level",
|
||||
loglevel,
|
||||
loglevel.value,
|
||||
"--reload",
|
||||
"--reload-dir",
|
||||
app_name.split(".")[0],
|
||||
|
Loading…
Reference in New Issue
Block a user