Skip to content

CI‐CD Workflows

Tong Lam edited this page Apr 2, 2024 · 3 revisions

Reference: https://github.com/mgrum/flask-example-cicd/blob/main/.github/workflows/README.md

Overall

Our project will run two Github Action Workflows, one runs after a devolp branch is push to github (when you push your commit), the other runs after the dev branch merge into main.

DEV - Build and Unittest

dev_build.yml

Event: On push → any branch except main

Jobs:

  • Build -> Pylint, Isort and Prettier
  • Test -> Unittest

PROD - CI/CD Pipeline

prod_pipeline.yml

Event: On push → main

Jobs:

  • Build -> Pylint, Isort and Prettier
  • Test -> Unittest
  • Deploy (Not set up yet)

Secrets

The sensitive information is configured in project secrets, which can be accessed by GitHub Actions when the workflow runs. So GitHub Actions can run the tests without needing the config.ini file to be included in the source code.

image

Clone this wiki locally