Crafting a CI Pipeline: My Experience with GitHub Actions, Python & AWS
<p>Integrating code consistently and ensuring it meets best practices is challenging but essential. Today, I aim to share a reliable GitHub Actions setup that I’ve tailored specifically for Python Serverless projects on AWS. Additionally, I’ll introduce a Makefile I’ve designed to streamline task management. Armed with these tools, our goal is to craft software that’s both well-crafted and robust.</p>
<p>Let’s go!</p>
<blockquote>
<p>CI pipeline we are going to build will be relying on poetry: if you aren’t already using it, I highly recommend giving it a glance. <a href="https://python-poetry.org/" rel="noopener ugc nofollow" target="_blank">Poetry</a> is a remarkable tool that provides a seamless way to manage dependencies, and ensuring a unified and reproducible build environment.</p>
</blockquote>
<h2>The Magic of the “Makefile”</h2>
<p>While the Makefile isn’t frequently associated with the Python ecosystem, it’s an invaluable asset when it comes to task simplification. The Makefile we’ll be discussing not only facilitates executing commands on our local setup but also streamlines operations in both our CI and upcoming CD pipeline.</p>
<p>In our Makefile we will focus on:</p>
<ul>
<li><strong><em>Initialising our local environment.</em></strong></li>
<li><strong><em>Reformatting code. </em></strong>It’s crucial to ensure our code adheres to PEP standards, along with the unique coding norms set by our team.</li>
<li><strong><em>Linting. </em></strong>Linting conducts a static analysis to pinpoint potential discrepancies related to the use of mismatched or incorrect data types. This preemptive measure averts runtime errors, leading to a hassle-free development cycle and a more robust end product.</li>
<li><strong><em>Executing Tests.</em></strong></li>
<li><strong><em>Auditing </em></strong>our codebase to uncover possible security risks.</li>
</ul>
<p>By including these tasks, we streamline the setup and upkeep of our codebase. It becomes less arduous for developers to chip in and work together.</p>
<p><a href="https://medium.com/@dkraczkowski/crafting-a-ci-pipeline-my-experience-with-github-actions-python-aws-c67f428adee8">Website</a></p>