{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# Continuous Integration Testing\n",
    "\n",
    "\n",
    "## Overview\n",
    "\n",
    "The OpenMDAO repository is hosted on [GitHub.com](https://github.com/OpenMDAO/OpenMDAO) and makes use\n",
    "of GitHub Actions to perform [continuous integration](https://docs.github.com/en/actions/automating-builds-and-tests/about-continuous-integration#about-continuous-integration) \n",
    "(CI) testing as code is contributed and to monitor the code base for potential problems due to dependencies.\n",
    "\n",
    "\n",
    "## OpenMDAO Tests workflow\n",
    "\n",
    "When a pull request is submitted to the main fork of OpenMDAO, GitHub will trigger execution of the [OpenMDAO Tests](https://github.com/OpenMDAO/OpenMDAO/blob/master/.github/workflows/openmdao_test_workflow.yml) workflow. This script will create several different python environments, on Linux and on Windows, and run the full set of tests via `testflo`. By testing against different environments and different versions of dependencies, this CI testing can be more thorough and potentially identify bugs that you might miss when testing locally.  In addition, this workflow will generate a test coverage report and perform a scan to look for common Python security issues using the [bandit](https://bandit.readthedocs.io/en/latest/) static code analyser. \n",
    "\n",
    "Finally, this workflow includes one job specifically for building the documentation with [Jupyter Book](https://jupyterbook.org/en/stable/intro.html).  If there are any warnings or errors during the build process, they will be listed in the workflow output under the \"Display doc build reports\" header.\n",
    "\n",
    "This workflow can be a handy reference for how to build an OpenMDAO environment with all the optional dependencies. In particular you can see how to install MPI support with PETSc and how to install [pyOptSparse](https://github.com/mdolab/pyoptsparse) using the [build_pyoptsparse](https://github.com/OpenMDAO/build_pyoptsparse) utility.\n",
    "\n",
    "## OpenMDAO Audit workflow\n",
    "\n",
    "While the `bandit` scan in the OpenMDAO Tests workflow will scan for potentially vulnerable code in OpenMDAO, there is an additional security scan that runs nightly that uses [pip-audit](https://pypi.org/project/pip-audit/) to alert the development team of any vulnerabilities in our upstream dependencies. This is the purpose of the [OpenMDAO Audit](https://github.com/OpenMDAO/OpenMDAO/blob/master/.github/workflows/openmdao_audit.yml) workflow.\n",
    "\n",
    "## OpenMDAO Latest workflow\n",
    "\n",
    "The [OpenMDAO Latest](https://github.com/OpenMDAO/OpenMDAO/blob/master/.github/workflows/openmdao_latest_workflow.yml) workflow runs on a nightly basis to check for any changes or deprecations in the pre-release versions of all of the OpenMDAO dependencies.  This allows the development team to get ahead of any upcoming breaking changes before they are actually released."
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
