@@ -260,7 +260,53 @@ button a new box pops up that indicates that 4 different CI runs are executing.
260260architecture. If we click on ` Details ` for one of the runs, we get taken to where the workflow is actually running,
261261and the output it is generating.
262262
263+ The run is broken down into ` steps ` , each of which has a name. The one we are interested in is
264+ ` Build and test our package ` , which is where we defined our build processs. While the build is running we can read the
265+ output, or we can view it after the run completes. Regardless, we note that the output is almost identical to that
266+ which we had when we ran the workflow ourselves. This is no more than we expect in reality, since this is what EESSI
267+ is supposed to deliver for us.
268+
269+ If we wait a little we should see that our CI will succeed! :rocket : When it does the brown button in our Pull Request
270+ will become a green tick which indicates that our CI for the commit has passed.
271+
272+ ??? note "What would have our CI looked like in GitLab?"
273+
274+ There are not so many differences with how our specific CI would have looked like in CI/CD. One major difference is
275+ where the CI file is stored. In the case of GitLab CI/CD, the workflow must be stored in a file called
276+ `.gitlab-ci.yml` in the base directory of the repository. The documentation of EESSI GitLab compenent
277+ again provides a starting point from which we can construct a final CI file:
278+ ```yaml title=".gitlab-ci.yml"
279+ --8<-- "scripts/.gitlab-ci.yml"
280+ ```
263281
264282### What happens when CI fails?
265283
284+ What does a failure look like in CI? We know that if we do not load the ` buildenv ` module, our tests should fail. Let's
285+ construct that scenario, by commenting out the line that loads that module:
286+ ``` yaml title="ci.yml"
287+ --8<-- "scripts/ci-broken.yml"
288+ ```
289+
290+ We can now push the change to our Pull Request to rerun the CI.
291+ ``` { .bash .copy }
292+ git add .github/workflows/ci.yml
293+ git commit -m " Don't load buildenv, which should break our CI"
294+ git push origin add_ci_to_project
295+ ```
296+
297+ Eventually, as expected, our CI will fail and we will get a red X beside our commit. We should also receive an email
298+ notification that our CI has failed. Such notifications are a critical part of CI, the value of CI is not just that
299+ the tests run silently, but that we are made aware immediately when things go wrong.
300+
266301## Benefits of CI
302+
303+ By automatically building and validating software whenever changes are made,
304+ CI helps developers identify issues early, reduce integration problems, and maintain confidence in the stability of
305+ their code.
306+
307+ Combined with EESSI’s reproducible software environment, CI ensures that applications are tested under the
308+ same conditions regardless of where they are executed, improving reliability, collaboration, and overall software
309+ quality throughout the development process.
310+
311+ It also means that when things go wrong, it is straightforward for us to drop into the environment where the tests
312+ fail, and interactively explore the problem.
0 commit comments