Reducing CI/CD overhead

I found that running CI/CD Github Actions was adding significant overhead to the development workflow of a project that I am managing.

To reduce this overhead, I changed the trigger condition in .ci.yml to only run when a specific label is added to the PR:

name: CI

on:
  pull_request:
    types: [labeled, unlabeled, synchronize]
  pull_request_target:
    types: [opened, reopened, edited, synchronize, ready_for_review, labeled, unlabeled]
    branches: [ master ]
  push:
    branches: [ master ]

This means reduces a costly and troublesome barrier to creating a PR and allows also for more iterative development. Thus my instructions to a collaborator are as follows:

  1. Open a PR as soon as possible, but keep it in Draft mode until you have enough to show for your efforts.
  2. Change the PR to Ready (i.e. not Draft) when you have finished the main work, even if you haven’t completed writing the tests.
  3. Don’t worry about the CI/CD checks, those will be triggered manually, just make sure the tests and formatting pass in your local dev environment.
  4. When the PR is ready for review I will check out your branch and run the CI/CD


all tags