tnc-ca-geo / animl-api

Backend for https://animl.camera
4 stars 0 forks source link

Implement CI/CD workflow #204

Open nathanielrindlaub opened 2 weeks ago

nathanielrindlaub commented 2 weeks ago

@jue-henry and @alukach - I'd welcome any suggestions you have as I'm not too familiar with implementing this. In addition to the issues Henry has run into recently while deploying from his local machine, this Sharp install issue (see note here) is driving me a bit insane and could be fixed with a centralized, remote build and deployment workflow.

It looks like there's a Serverless GH action that we might want to use? https://github.com/marketplace/actions/serverless

nathanielrindlaub commented 2 weeks ago

Might not actually need that serverless GH action: https://towardsaws.com/creating-restful-api-using-serverless-framework-with-typescript-and-github-actions-71f2ae4b401b#1f48

nathanielrindlaub commented 2 weeks ago

We have the following processes to include in the workflow, I'm just not sure where exactly makes the most sense:

  1. linting (eslint)
  2. GraphQL typescript codegen (graphql-codegen)
  3. Mongoose typescript codegen (?)
  4. compiling (tsc)
  5. testing (tape)
  6. deploying* (serverless)

* serverless is currently also preforming the typescript compilation step before building

We'd need to figure out how to deploy to staging vs production branch as well.