djangoindia / djangoindia.org

Official website of djangoindia community.
https://djangoindia.org
MIT License
99 stars 47 forks source link

[FEATURE] Add github workflow to check frontend build and backend running successfully. #94

Closed DevilsAutumn closed 2 weeks ago

DevilsAutumn commented 2 months ago

Summary

na

Description

when someone creates a PR on main, staging and prod branch , the github action should be triggered making sure the frontend is building successful and backend server is also successfully starting. With this we can catch potential hidden bugs breaking builds before they get merged into main branch.

Use Case

No response

Alternatives

No response

Affected Area

Both

DraKen0009 commented 2 months ago

@DevilsAutumn the frontend build is failing

traceback

> next build

  ▲ Next.js 14.2.3

   Creating an optimized production build ...
(node:26772) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
 ⚠ For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
 ⚠ For production Image Optimization with Next.js, the optional 'sharp' package is strongly recommended. Run 'npm i sharp', and Next.js will use it automatically for Image Optimization.
Read more: https://nextjs.org/docs/messages/sharp-missing-in-production
(node:39532) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
(Use `node --trace-deprecation ...` to show where the warning was created)
(node:39532) Warning: To load an ES module, set "type": "module" in the package.json or use the .mjs extension.
 ✓ Compiled successfully
 ✓ Linting and checking validity of types
   Collecting page data  .TypeError: Invalid URL
    at new URL (node:internal/url:814:29)
    at 2029 (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:3403)
    at t (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\webpack-runtime.js:1:128)
    at 2185 (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:955)
    at t (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\webpack-runtime.js:1:128)
    at n (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:4458)
    at C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:4489
    at t.X (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\webpack-runtime.js:1:1206)
    at C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:4471
    at Object.<anonymous> (C:\Users\praff\PycharmProjects\djangoindia.org\frontend\.next\server\app\_not-found\page.js:1:4516) {
  code: 'ERR_INVALID_URL',
  input: 'undefined'
}

> Build error occurred
Error: Failed to collect page data for /_not-found
    at C:\Users\praff\PycharmProjects\djangoindia.org\frontend\node_modules\next\dist\build\utils.js:1268:15
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {
  type: 'Error'
}

any quick fix for it?

DevilsAutumn commented 2 months ago

@DraKen0009 yeah, a quickfix is removing metadataBase from frontend/src/app/layout.tsx .

DraKen0009 commented 2 months ago

should I remove it and make a PR?

DevilsAutumn commented 2 months ago

have you added NEXT_PUBLIC_FRONTEND_URL = http://localhost:3000 in your .env? It should be working in that case 🤔

DraKen0009 commented 2 months ago

I'm not sure either. I do have it in my .env at port 3000. Also interestingly when I'm directly putting the string (localhost:3000) it does works

DevilsAutumn commented 1 month ago

@DraKen0009 any updates on this?

DevilsAutumn commented 2 weeks ago

@engagepy any updates on this?

engagepy commented 2 weeks ago

Was unwell, still recovering.

Please be assured, will be done before coming Monday.

On 23 Oct 2024, at 17:58, Bhuvnesh @.***> wrote:

@engagepy https://github.com/engagepy any updates on this?

— Reply to this email directly, view it on GitHub https://github.com/djangoindia/djangoindia.org/issues/94#issuecomment-2431983495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKG4K73CITLB3XA3QHVNA4DZ46I65AVCNFSM6AAAAABMYMZH7OVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMZRHE4DGNBZGU. You are receiving this because you were mentioned.

praptisharma28 commented 2 weeks ago

Assign me @DevilsAutumn !

DevilsAutumn commented 2 weeks ago

Assign me @DevilsAutumn !

someone already working on it.