check_outdated_dependencies.yml 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. name: check-outdated-dependencies
  2. permissions:
  3. contents: read
  4. on:
  5. push: # This will trigger the action when a pull request is opened or updated.
  6. branches:
  7. - "release/**" # This will trigger the action when any branch starting with "release/" is created.
  8. workflow_dispatch: # Allow manual triggering if needed.
  9. jobs:
  10. backend:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - name: Checkout code
  14. uses: actions/checkout@v3
  15. - uses: ./.github/actions/setup_build_env
  16. with:
  17. python-version: 3.13
  18. run-uv-sync: true
  19. - name: Check outdated backend dependencies
  20. run: |
  21. outdated=$(uv pip list --outdated)
  22. echo "Outdated:"
  23. echo "$outdated"
  24. filtered_outdated=$(echo "$outdated" | grep -vE 'pyright|ruff' || true)
  25. if [ ! -z "$filtered_outdated" ]; then
  26. echo "Outdated dependencies found:"
  27. echo "$filtered_outdated"
  28. exit 1
  29. else
  30. echo "All dependencies are up to date. (pyright and ruff are ignored)"
  31. fi
  32. frontend:
  33. runs-on: ubuntu-latest
  34. steps:
  35. - name: Checkout code
  36. uses: actions/checkout@v4
  37. - uses: ./.github/actions/setup_build_env
  38. with:
  39. python-version: 3.13
  40. run-uv-sync: true
  41. - name: Clone Reflex Website Repo
  42. uses: actions/checkout@v4
  43. with:
  44. repository: reflex-dev/reflex-web
  45. ref: main
  46. path: reflex-web
  47. - name: Compile pyproject.toml into requirements.txt
  48. working-directory: ./reflex-web
  49. run: uv pip compile pyproject.toml --no-annotate --no-header --no-deps --output-file requirements.txt
  50. - name: Install Requirements for reflex-web
  51. working-directory: ./reflex-web
  52. run: uv pip install $(grep -ivE "reflex " requirements.txt)
  53. - name: Init Website for reflex-web
  54. working-directory: ./reflex-web
  55. run: uv run reflex init
  56. - name: Run Website and Check for errors
  57. run: |
  58. uv run bash scripts/integration.sh ./reflex-web dev
  59. - name: Check outdated frontend dependencies
  60. working-directory: ./reflex-web/.web
  61. run: |
  62. raw_outdated=$(/home/runner/.local/share/reflex/bun/bin/bun outdated)
  63. outdated=$(echo "$raw_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\|' || true)
  64. echo "Outdated:"
  65. echo "$outdated"
  66. # Ignore 3rd party dependencies that are not updated.
  67. filtered_outdated=$(echo "$outdated" | grep -vE 'Package|@chakra-ui|lucide-react|@splinetool/runtime|ag-grid-react|framer-motion|react-markdown|remark-math|remark-gfm|rehype-katex|rehype-raw|remark-unwrap-images|ag-grid' || true)
  68. no_extra=$(echo "$filtered_outdated" | grep -vE '\|\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-' || true)
  69. if [ ! -z "$no_extra" ]; then
  70. echo "Outdated dependencies found:"
  71. echo "$filtered_outdated"
  72. exit 1
  73. else
  74. echo "All dependencies are up to date. (3rd party packages are ignored)"
  75. fi