nhs-england-tools / repository-template

🛠️ 📚💡 This is a detailed and carefully made template for your GitHub projects. It's based on the wide knowledge and practical experience of the engineering community within NHS England. The template includes helpful suggestions, standards and practices - it's something you should consider using for all your repositories.
MIT License
31 stars 12 forks source link

Experimental: Test GitHub Actions locally #114

Closed stefaniuk closed 1 year ago

stefaniuk commented 1 year ago

Description

This PR introduces the nektos/act project to run GitHub Actions workflows on a developer's local machine, providing a fast, cost-effective and resource-efficient way to test changes to actions and debug before pushing to GitHub. It emulates the GitHub Actions runner environment using Docker containers, allowing for an identical testing conditions.

Context

image

Testing

# clone the repo and switch to the `Test_GitHub_Actions_locally` branch, then run:
$ make runner-act workflow="stage-1-commit" job="cloc-repository"

Type of changes

Checklist


Sensitive Information Declaration

To ensure the utmost confidentiality and protect your and others privacy, we kindly ask you to NOT including PII (Personal Identifiable Information) / PID (Personal Identifiable Data) or any other sensitive data in this PR (Pull Request) and the codebase changes. We will remove any PR that do contain any sensitive information. We really appreciate your cooperation in this matter.