Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tn improve GitHub actions #8

Closed

Conversation

tanguyNaets
Copy link

@tanguyNaets tanguyNaets commented Mar 15, 2022

(NOTE: test pipeline is currently failing because the previous PR to fix flake8-bandit is not part of main yet.)

  • Implement github action workflows with similar evolved behavior to the gitlab ci
    • Dockerise the application for testing
    • Cache the docker images for faster rebuild
    • Use same tagging strategy as in the gitlab ci, both for CI and App docker images
    • Upload mypy and pytest results as artifacts only on testing failure as in gitlab ci instead of not uploading those artifacts at all
    • Upload coverage result as an artifact (previously, the purpose was apparently to send the coverage result to Codecov, but failed because Codecov requires a priced account and tokens to connect to it)
    • Enforce successful Test workflow before manual triggering of Deploy workflow
    • Set-up feature, test, development, acceptance, production environments that get integrated with github web interface (similarly to what we achieve in gitlab ci)
    • Prevent Deploy workflow from running on acceptance and production environments if not tagged (similarly to what we achieve in gitlab ci)
    • Prevent Publish workflow from running if Test workflow failed in github actions
    • Run Publish workflow poetry commands in the docker image
  • Put emphasis on one tricky part of the readme installation steps
  • Refactor DOCKER_PUSH variable into more understandable DOCKER_BUILD_PUSH
  • Ensure DOCKER_BUILD_PUSH is set to 1 when deploying so App image building, tagging and pushing gets triggered.
  • Remove pip dependabot, as it doesn't follow the allowed bumping strategy defined for each package in the pyproject.toml. For instance, it will try to major version a package, even if the package strategy in the pyproject.toml is set to not bump, bump patch or bump minor

…projects, and dev dependency only for other projects
…etry-cookiecutter into tn-improve-github-actions

Get latest remote# the commit.
@lsorber
Copy link
Member

lsorber commented Mar 25, 2022

Hey @tanguyNaets, thanks for this PR! It's a pretty big one, so it will take some time to go through this in detail. Are there any smaller parts you could spin out into a separate PR so that we can get those improvements merged quicker already?

@tanguyNaets
Copy link
Author

In addition to the main goal of the PR (improve github actions), I could have the following PRs:

  1. Small edit of the readme to put emphasis on an easily missed step (1 line change)
  2. Remove pip from github's dependabot (3 lines removed)
  3. Leverage properly sentry: I can probably remove that one now that you are tackling it in your sentry PR. I'll need a bit of refactoring to remove the changes related to that bit of the PR.

Apart for the 3rd one, is it really worth it for you having 1 and 2 in separate PRs? If so, I'll split them. LMK

@tanguyNaets
Copy link
Author

I removed the 3rd one since sentry is now a generic feature. RFR

1 similar comment
@tanguyNaets
Copy link
Author

I removed the 3rd one since sentry is now a generic feature. RFR

@lsorber lsorber self-requested a review June 20, 2022 10:44
@lsorber
Copy link
Member

lsorber commented Jun 20, 2022

Related: #63

@lsorber lsorber marked this pull request as draft August 6, 2022 15:56
@lsorber
Copy link
Member

lsorber commented Feb 23, 2024

Closing this PR as we've recently reworked the CI/CD pipelines in #206.

@lsorber lsorber closed this Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants