check_outdated_dependencies.yml 2.8 KB

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