Ensure generated CI mocks are up to date

May 26, 2023
Closed
Closed
Contribution Opportunity
  • Links

What is a Contribution Opportunity?

A Contribution Opportunity is a concrete task that you can work on to contribute to the Optimism Collective.

Summary

The Optimism Monorepo is one of the primary places where work happens on the OP Stack, the open source software stack that powers the Optimism Collective. The Monorepo relies on certain generated "mock" files for testing. It is important to make sure that the generated mocks stay up to date at all times.

Addressing this Contribution Opportunity requires the following:

  • Add a target to the top-level Makefile that enters the op-node and op-service folders and executes the command go generate ./... in both
  • Add a ci job that executes this command and checks that no diff exists by running the command git diff --exit code, see here for an example

Impact

Ensuring mocks are up to date means that testing CI jobs won't fail and that we're always testing the latest content.

  • More Information
  • Tag 1
    Protocol
  • Tag2
    OP Stack
  • Tag3