Skip to content

Commit

Permalink
Add integration test to reflex export
Browse files Browse the repository at this point in the history
Ensure that the changes can be compiled and exported successfully with the
version of reflex in `main`. Allow specifying an alternative reflex dependency
for manual runs.
  • Loading branch information
masenf committed Nov 15, 2023
1 parent 40c411d commit 95f7d16
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/integration_tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: integration-tests

env:
REFLEX_DEP: "git+https://github.com/reflex-dev/reflex@main"
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
reflex_dep:
description: "Reflex dependency (full specifier)"

permissions:
contents: read

defaults:
run:
shell: bash

env:
# Windows CI would fail without this.
# Ref: https://gist.github.com/NodeJSmith/e7e37f2d3f162456869f015f842bcf15
# TODO: can we fix windows encoding natively within reflex? Bug above can hit real users too (less common, but possible)
# - Catch encoding errors when printing logs
# - Best effort print lines that contain illegal chars (map to some default char, etc.)
PYTHONIOENCODING: "utf8"
TELEMETRY_ENABLED: false
NODE_OPTIONS: "--max_old_space_size=4096"

jobs:
reflex-web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Install Requirements for reflex-web and reflex
run: pip install '${{ github.event.inputs.reflex_dep || env.REFLEX_DEP }}' -r requirements.txt
- name: Init Website for reflex-web
run: reflex init
- name: Export the website
run: reflex export

0 comments on commit 95f7d16

Please sign in to comment.