akauppi / GroundLevel-firebase-es

[ANCHORED] Stencil for operational web apps
https://groundlevel-sep22.web.app/
Other
23 stars 3 forks source link

CI: running deployments only if test for the same GitHub SHA has passed #102

Closed akauppi closed 2 years ago

akauppi commented 2 years ago

Reduces complexity by keeping test-running and deployment separate, yet still guarantees tests get run before deployment.

  1. test CI tasks shall write the SHA somewhere, if the tests pass
  2. deployment tasks check it, and immediately fail if not found

For manual excercising (development of CI), one can fake by providing an SHA that exists in the cache. ;)


Details

Storage can be anything persistent, within the ci-builder account (store also project name).

Cloud Storage

akauppi commented 2 years ago

Tangential thought:

Make an Action that checks, whether the tests have passed for the particular commit SHA. Allow merge only then.

Implications to deploy scripts:

akauppi commented 2 years ago

Implemented in 963790c

GitHub Actions left out.