integration_tests_wsl.yml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: integration-tests-wsl
  2. concurrency:
  3. group: ${{ github.workflow }}-${{ github.event.pull_request.id }}
  4. cancel-in-progress: true
  5. on:
  6. push:
  7. branches: ["main"]
  8. paths-ignore:
  9. - "**/*.md"
  10. pull_request:
  11. branches: ["main"]
  12. paths-ignore:
  13. - "**/*.md"
  14. permissions:
  15. contents: read
  16. env:
  17. TELEMETRY_ENABLED: false
  18. NODE_OPTIONS: "--max_old_space_size=4096"
  19. jobs:
  20. example-counter-wsl:
  21. timeout-minutes: 30
  22. # 2019 is more stable with WSL in GH actions
  23. # https://github.com/actions/runner-images/issues/5151
  24. # Confirmed through trial and error. 2022 has >80% failure rate (probably BSOD)
  25. runs-on: windows-2019
  26. steps:
  27. - uses: actions/checkout@v4
  28. - name: Clone Reflex Examples Repo
  29. uses: actions/checkout@v4
  30. with:
  31. repository: reflex-dev/reflex-examples
  32. path: reflex-examples
  33. - uses: Vampire/setup-wsl@v3
  34. with:
  35. distribution: Ubuntu-24.04
  36. - name: Install Python
  37. shell: wsl-bash {0}
  38. run: |
  39. apt update
  40. apt install -y python3 python3-pip curl dos2unix zip unzip
  41. - name: Install Uv
  42. shell: wsl-bash {0}
  43. run: |
  44. curl -LsSf https://astral.sh/uv/install.sh | sh
  45. - name: Install reflex deps
  46. shell: wsl-bash {0}
  47. run: |
  48. /root/.local/bin/uv sync --link-mode=copy
  49. - name: Install requirements for counter example
  50. working-directory: ./reflex-examples/counter
  51. shell: wsl-bash {0}
  52. run: |
  53. /root/.local/bin/uv pip install -r requirements.txt --link-mode=copy
  54. - name: Check export --backend-only before init for counter example
  55. working-directory: ./reflex-examples/counter
  56. shell: wsl-bash {0}
  57. run: |
  58. export TELEMETRY_ENABLED=false
  59. /root/.local/bin/uv run reflex export --backend-only
  60. - name: Check run --backend-only before init for counter example
  61. shell: wsl-bash {0}
  62. run: |
  63. export TELEMETRY_ENABLED=false
  64. dos2unix scripts/integration.sh
  65. /root/.local/bin/uv run bash scripts/integration.sh ./reflex-examples/counter dev 8001 --backend-only --backend-port 8001
  66. - name: Init Website for counter example
  67. working-directory: ./reflex-examples/counter
  68. shell: wsl-bash {0}
  69. run: |
  70. export TELEMETRY_ENABLED=false
  71. /root/.local/bin/uv run reflex init --loglevel debug
  72. - name: Check export for counter example
  73. working-directory: ./reflex-examples/counter
  74. shell: wsl-bash {0}
  75. run: |
  76. export TELEMETRY_ENABLED=false
  77. /root/.local/bin/uv run reflex export --frontend-only --loglevel debug
  78. - name: Run Website and Check for errors
  79. shell: wsl-bash {0}
  80. run: |
  81. export TELEMETRY_ENABLED=false
  82. /root/.local/bin/uv run bash scripts/integration.sh ./reflex-examples/counter dev