Can arduino-cli verify sketches? I'm trying to do some simple unit testing with arduino-cli in a .gitlab-ci file like so

variables:
  DOCKER_HOST: tcp://docker:2375

image: "docker:latest"

services:
  - docker:dind


before_script:
  - docker pull "arduino/arduino-cli:latest"
  - arduinocli(){ docker run arduino/arduino-cli:latest "$@";}

search:
  script:
    - arduinocli lib search hi


but instead of arduinocli lib search hi at the end, I want to verify my sketch. Is there a way to do this with arduino-cli?
In Arduino parlance the word "Verify" is used (erroneously) to mean "Compile the code into a binary or HEX file, but don't upload it to the board". 

To compile (and thus "verify") the code just pass the compile command to arduino-cli with the board you want to compile for and the sketch you want to compile.