Using GitHub Actions To Add Continuous Integration (CI) To A Project (GitHub / Python)

A GitHub Actions job failure email

In this blog post I will be discussing Continuous Integration (CI) with GitHub Actions. Readers of previous blog entries may remember that I’ve tackled Continuous Integration (CI) with GitLab previously (see: https://geektechstuff.com/2021/04/05/python-unit-test-and-some-ci-via-gitlab-python/ ) and that last autumn (2021) I got into more testing (see: https://geektechstuff.com/2021/10/06/personal-update-django-and-mvc-mtv/ ).  Thankfully both have helped as the current module of my degree apprenticeship is … Continue reading Using GitHub Actions To Add Continuous Integration (CI) To A Project (GitHub / Python)

AttributeError: ‘FlaskClientTestCase’ object has no attribute ‘app_context’ – Unit Testing (Python)

Less of blog post and more of a reminder to myself. When using Flask and Unit Testing with Python, if either of the below errors occur (or something similar): Then it may be because the setUp function of the test class has not set up correctly. Spent some time going round in circles until I … Continue reading AttributeError: ‘FlaskClientTestCase’ object has no attribute ‘app_context’ – Unit Testing (Python)

AWS Lambda – Stop Instances Outside Office Hours (Python / AWS)

I previously wrote about using some Python to stop AWS EC2 instances that had the tag “office_hours” and indicated that this could be automatically run via AWS Lambda. This blog post is a brief follow up with some notes on creating the Lambda function, using the Python from the previous blog post. Using AWS Lambda … Continue reading AWS Lambda – Stop Instances Outside Office Hours (Python / AWS)

Docker – Environment Variables, Env File & A Little Django (Python)

Docker logo

Why Use Environment Variables? Whilst building my Django project I replaced several of the values within settings.py with an option for them to be read from environment variables, rather than storing them in plain text within settings.py. This change allows me to store the settings.py file within a source control repository (e.g. Git) and also … Continue reading Docker – Environment Variables, Env File & A Little Django (Python)