Replace this template with your information
it is a simple stage, but spend me a lot of time to know the reason.
this code works
test:
stage: verify
script:
- npm ci
- npm run test
- echo "CI_COMMIT_REF_NAME is ${CI_COMMIT_REF_NAME}"
this is not
test:
stage: verify
script:
- npm ci
- npm run test
- - echo "CI_COMMIT_REF_NAME is: ${CI_COMMIT_REF_NAME}"
the only different is, I addd “:” in echo command, which should be fine. But seems Gitlab CI doesn’t like it. I got below error
Found errors in your .gitlab-ci.yml:
jobs:test:script config should be a string or a nested array of strings up to 10 levels deep
You can also test your .gitlab-ci.yml in CI Lint