integration_website.yml 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. name: integration-test
  2. on:
  3. pull_request_review:
  4. types: [submitted]
  5. permissions:
  6. contents: read
  7. jobs:
  8. build:
  9. if: github.event.review.state == 'approved' && github.event.pull_request.base.ref == 'main'
  10. runs-on: ubuntu-latest
  11. # Specify python/node versions to test against
  12. strategy:
  13. matrix:
  14. python-version: ["3.10", "3.11"]
  15. node-version: ["16.x"]
  16. steps:
  17. - uses: actions/checkout@v3
  18. - name: Use Node.js ${{ matrix.node-version }}
  19. uses: actions/setup-node@v3
  20. with:
  21. node-version: ${{ matrix.node-version }}
  22. - name: Set up Python ${{ matrix.python-version }}
  23. uses: actions/setup-python@v4
  24. with:
  25. python-version: ${{ matrix.python-version }}
  26. # Clone Reflex Website Repo For integration tests
  27. - name: Clone Reflex Website Repo
  28. uses: actions/checkout@v3
  29. with:
  30. repository: pynecone-io/pcweb
  31. path: pcweb
  32. # Install poetry
  33. - name: cache poetry install
  34. uses: actions/cache@v2
  35. with:
  36. path: ~/.local
  37. key: python-${{ matrix.python-version }}-poetry-1.3.1
  38. - uses: snok/install-poetry@v1
  39. with:
  40. version: 1.3.1
  41. virtualenvs-create: true
  42. virtualenvs-in-project: true
  43. - name: cache deps
  44. id: cache-deps
  45. uses: actions/cache@v2
  46. with:
  47. path: .venv
  48. key: python-${{ matrix.python-version }}-pydeps-${{ hashFiles('**/poetry.lock') }}
  49. - name: Poetry Install
  50. run: poetry install --no-interaction
  51. - name: Install Requirements
  52. working-directory: ./pcweb
  53. run: poetry run pip install -r requirements.txt && poetry run pip install googletrans
  54. - name: Init Website
  55. working-directory: ./pcweb
  56. run: poetry run reflex init
  57. - name: Run Website and Check for errors
  58. run: |
  59. chmod +x ./scripts/integration.sh
  60. ./scripts/integration.sh ./pcweb prod