techx / quill

📝 Registration, for hackathons!
https://medium.com/hackmit-stories/quill-an-open-source-hackathon-registration-system-91f3a06d22a2
GNU Affero General Public License v3.0
443 stars 342 forks source link

Release and Maintenance Pipeline Updates #143

Closed krubenok closed 4 years ago

krubenok commented 4 years ago

Description

As part of a class project for ECSE437: Software Delivery, myself, @srandall97, @staceybeard, @veronicaboychuk, and @AmineAlikacem were assigned to make improvement on the release and development pipelines for an open source project. We chose to work on Quill and will be tackling several issues to modernize the project.

This PR Draft will be updated as we make changes.

Github PR and Issue Templates

Motivation and Context

Templates for Issues and PR's promote more detailed descriptions of changes and issues while primitively answering several common follow up questions. These templates are quite standard and were sourced from well-know suggestions such as this guide.

Types of changes

Addition of .nvmrc file

Motivation and Context

Adding an .nvmrc file helps to standardize the version of NodeJS used across deployments and development. See the nvm project to learn more. The 10.17.0 version was selected as it is the most recent version on the 10.x train in LTS.

How Has This Been Tested

The version has been tested on macOS Catalina in a development environment as well as in production on Heroku and in a Docker container.

Types of changes

Adoption of Contributor Covenant Code of Conduct

Motivation and Context

Adopting a code of conduct helps to promote civil and productive discussions while developing software and makes open source a more inclusive and welcoming community. We selected the Contributor Covenant based on it's wide adoption and thorough code of conduct. Read more about it here.

Addition of Docker Functionality

Motivation and Context

Docker is a popular containerization solution to allow for portable development and production environments. To this end, we have created a Dockerfile and a .dockerignore to specify how the container for the project should be built. We have also added a GitHub Actions workflow to publish this container to the Docker Hub container registry automatically after each push to the master branch.

How Has This Been Tested

We have pulled and deployed the container in various dev and production environments with no issues.

Types of changes

Addition of ESLint Style Checking

Motivation and Context

Having style checking and enforcement helps to make code more readable and consistent across a team of developers. ESLint is a popular tool for this purpose and we have chosen to adopt it not only with a local script npm run lint but also a Github Action to automatically run the script and report errors on every push and pull request. The rule set is extremely basic at the moment but maintainers should decide on a style guide such as AirBnb's to adopt across the project.

How Has This Been Tested

We have run several lints on the project in dev and production. Note: We have left the semi-colon errors unfixed for demonstration purposes, but the rule set should be fleshed out to be more complete ASAP.

Types of changes

Build and Test Workflow

Motivation and Context

Having a basic build and test CI/CD pipeline helps immensely in quickly understanding the status of a commit or pull request to ensure things are still functioning in a standard environment. To this end, a very basic Jest unit test has been added to check that the login page returns and HTTP200 code and that the project builds successfully. This has been automated with another Github Action that will run on each and every push to every branch and report back with a status.

How Has This Been Tested

The tests are not very thorough and should be made more complete soon.

Types of changes

Pa11y Accessibility Testing

Motivation and Context

Accessibility testing is a requirement for any modern project. Pa11y is a common tool kit for evaluating the accessibility of web based projects and has been implemented with the nom run test:accessibility command.

How Has This Been Tested

Tested on local deployments in development

Types of changes

Notification Services

Motivation and Context

A Discord and Slack notification service has been created in GitHub Actions to keep track of changes to this repo. Further instructions can be found in README.md

How Has This Been Tested

Tested in discord and slack servers with appropriate Github Secrets set.

Types of changes

Misc Documentation Upates

Motivation and Context

Added some other documentation updates to the README.md including adding a table of contents, more deployment instructions and examples. The License file was also updated to Markdown. Documentation was updated to make database hosting options more clear and to clarify the use of SMTP servers.

Types of changes

Recommended Follow Up

Dependabot

Dependabot should be enabled on this repo to keep the dependancies up to date. I'll leave it to the maintainers to debate the details of this.

Github Branch Protection Settings

The master branch should be protected behind GitHub Branch settings to require Pull Request to be reviewed and approved along with having passing CI/CD.

Github Secrets for Docker Hub

In order for the deploy to Docker Hub workflow to work, Github Secrets needs to be added to the repo. See README.md for details.

Adoption of opinionated Style Guide for ESLint

Maintainers should decide on an opinionated style guide as mentioned earlier.

Creation of more unit tests

More unit tests are necessary to really understand the progress of the project and to allow things like dependant to merge automatically into develop.

Add Codacy to upstream repo

We are using Codacy in the downstream repo to keep an eye on code quality and recommend using it here as well. Not the badge on README.md will need to be updated as well.

Types of changes

Checklist

krubenok commented 4 years ago

Please excuse this monstrosity of a PR. Having it in one place made things easier as a reference for the graders looking at our contributions to the project.

pshirlyn commented 4 years ago

Thanks so much for all the work!