Monstarrrr / rebutify

Where activists improve their advocacy by building, refining and using strong rebuttals to counter the objections to their movement.
https://rebutify.org
9 stars 4 forks source link

Unit Tests for Continuous Delivery (Backend) #93

Closed seporterfield closed 4 months ago

seporterfield commented 5 months ago

Run backend unit tests upon merge. Fail build if tests fail.

seporterfield commented 5 months ago

Proposal: use GitHub environments in place of .env files for GitHub workflows (since they're not committed)

Creating an environment

Using an environment in a workflow (same link)

Monstarrrr commented 5 months ago

Proposal: use GitHub environments in place of .env files (since they're not committed)

Creating an environment

Using an environment in a workflow (same link)

Good proposal but why in a comment of this issue?

seporterfield commented 5 months ago

Cause we very likely need it to have this flow work. It's specific to GitHub workflows (edited my earlier comment).

Right now the variables Django sets as default might work, but more complex CI flows will need GitHub environments.

The tests will crash if we don't set the DJANGO_SECRET_KEY in a GitHub environment used by this workflow.

purple-void commented 4 months ago

We hate having the code rely on GitHub and thus Microsoft. You mention it is required for "Unit Tests for Continuous Delivery". Is that important? If so, then okay.

seporterfield commented 4 months ago

Automated testing is essential! Plenty of studies prove this, including the annual State of DevOps Report which regularly shows that outfits that don't test are low performers.

Here's a quickie on CI/CD and automated testing https://www.youtube.com/watch?v=scEDHsr3APg

If you want to set up a separate CI/CD server and use something other than GitHub actions, by all means we can try it if it's a net benefit. Right now Github Actions would be the quickest and most convenient.

seporterfield commented 4 months ago

We hate having the code rely on GitHub and thus Microsoft.

To be clear, none of the code for our application relies on GitHub

purple-void commented 4 months ago

how does our application work without the environmental variables? which would be in GitHub environments

purple-void commented 4 months ago

we discussed in discord. we are fine with this decision