solidarity icon indicating copy to clipboard operation
solidarity copied to clipboard

Question: Skipping continuous integration

Open FrederickEngelhardt opened this issue 4 years ago • 1 comments

How does solidarity work for detecting that it is currently running on continuous integration?

Do I need to pass a flag? Example npx solidarity --ci

Also the question Should this rule be skipped on a Continuous Integration server? seems to output a "ci": true when selecting to skip the rule, is this intended or does "ci": true allow the rule to run on ci?

Screen Shot 2021-01-19 at 2 38 18 PM

Example

{
  "requirements": [
    {
      "rule": "cli",
      "binary": "",
      "platform": [
        "macos",
        "linux"
      ],
      "ci": true
    }
  ]
}

FrederickEngelhardt avatar Jan 19 '21 22:01 FrederickEngelhardt

It checks for an environment variable named "CI" which is usually set on most CI servers. If it's not, you can set it on your CI server.

Secondly, and I might be misremembering, but if your ci: false it will skip the test when on CI

GantMan avatar Jan 20 '21 04:01 GantMan