Skip to content

Overview

We use GitHub Actions to automate various workflows in our project. Every pull request (PR) goes through a series of checks to ensure code quality and functionality. These checks include running tests, linting code, and other automated validations. A PR will only be approved and merged if all the checks pass successfully. This process helps maintain the integrity of the codebase and ensures that only high-quality code is integrated into the main branch.

Tests

The GitHub Actions workflow file resides in .github/workflows/verify.yml. This file defines the various checks and tests that are run on each pull request. The main jobs defined in this workflow are:

Lint Checks

This job runs various linting and security checks to ensure code quality and security. The steps include:

  • Checking out the source code.
  • Setting up Node.js and Ruby environments.
  • Caching npm and Ruby gems dependencies.
  • Running lint checks for Ruby code.
  • Performing security checks using bundle-audit and brakeman.

RSpec

This job runs the RSpec tests to ensure the functionality of the application. The steps include:

  • Configuring system limits.
  • Checking out the source code.
  • Setting up Node.js and Ruby environments.
  • Caching npm and Ruby gems dependencies.
  • Setting up the application environment.
  • Running the RSpec tests.
  • Uploading the code coverage report.

Tests

This job runs additional tests to ensure the application works as expected. The steps include:

  • Configuring system limits.
  • Checking out the source code.
  • Setting up Node.js and Ruby environments.
  • Caching npm and Ruby gems dependencies.
  • Setting up the application environment.
  • Running the tests.
  • Uploading the code coverage and test summary reports.

Report

This job generates and uploads the test and coverage summaries. The steps include:

  • Checking out the source code.
  • Setting up Node.js and Ruby environments.
  • Caching npm and Ruby gems dependencies.
  • Downloading the test and coverage reports.
  • Generating the coverage summary.
  • Reading the test and coverage summaries.
  • Uploading the final reports.
  • Commenting on the pull request with the test and coverage results.