Nesting yaml anchors

This should not be this difficult.

Here’s what I’m trying that isn’t working. CILint complains, anyway.

.one: &one
  - echo one

.two: &two
  - echo two

.three: &three
  - *one
  - *two

build:
  stage: build
  script:
    - *three

What am I doing wrong? Or, more importantly, what’s the syntax for getting this right?

v13 ci lint does not complain about this construction. Sadly, I’m running v12.10.

CI Lint complains if the same is used with before_script. Shouldn’t be the same as with script?

This fails with syntax errors:

build:
  stage: build
  before_script:
    - *three
  script:
    - *three

This works, but I can’t find the way to add anything else in the before_script block:

build:
  stage: build
  before_script:
    *three
  script:
    - *three