Submodule only partially synced

When viewing my branch on Gitlab, it shows the common module to be at the latest commit 11ab39980f23b40eeead5c358b9d783e7013fa69

My .gitlab-ci.yml has these entries:

before_script:
  - git submodule sync --recursive
  - git submodule update --init --recursive
  - ls common
  - git ls-tree HEAD common

However, a required file in common called pubspec.yml is missing. My first thought was that common must be completely empty, but it has some files in it.

Here are the contents of common on my laptop:

README.md
analysis_options.yaml
api_config.yaml
api_descriptor.pb
build_protos.bat
build_protos.sh
lib
protos
pubspec.lock
pubspec.yaml

However, here’s the Gitlb CI job output, and note that even thought the commit SHA for common is correct, the folder only contains:

api_descriptor.pb
build_protos.sh
lib
protos
README.md

Here’s the output:

Running with gitlab-runner 11.6.0 (f100a208)
  on endpoints-test sMzfWepG
Using Shell executor...
Running on endpoints-test...
Fetching changes...
HEAD is now at 4e5f7f4 gitlab submodule issues
From https://gitlab.com/<redacted>/<redacted>/server-prototype
   4e5f7f4..7a2c00a  PROTO-38_companies_house_6 -> origin/PROTO-38_companies_house_6
Checking out 7a2c00a3 as PROTO-38_companies_house_6...
Skipping Git submodules setup

<snip/>

$ git submodule sync --recursive
Synchronizing submodule url for 'common'
$ git submodule update --init --recursive
$ ls common
api_descriptor.pb
build_protos.sh
lib
protos
README.md
$ git ls-tree HEAD common
160000 commit 11ab39980f23b40eeead5c358b9d783e7013fa69	common

What am I doing wrong?

I tried relative modules in .gitmodules, but get the same result.

We just added cache: {} everywhere (to not use caching), and not it clones properly.