"[latest] is an invalid version of Crystal" even though it _is_ valid

I get the following error message when trying to build an application in multiple stages:

Installing Crystal
[latest] is an invalid version of Crystal.
View valid versions of Crystal at https://docs.travis-ci.com/user/languages/crystal/

Relevant .travis.yml file:

dist: bionic

jobs:
  include:
    - stage: build
      language: crystal
      crystal:
        - latest
      before_install:
        - shards update
        - shards install
      install:
        - crystal build --error-on-warnings src/invidious.cr
      script:
        - crystal tool format --check
        - crystal spec

    - stage: build_docker
      services:
        - docker
      install:
        - docker-compose build

Works fine when the version specification is moved outside the build stage to the root right next to dist: bionic.

You need crystal: latest instead. (Though we should just take the first value of the array instead, as we do with other languages.)

Thanks, @BanzaiMan, crystal: latest works fine, but what if we need to test on latest and nightly? Will the yaml-array-style work when multiple entries are specified?

Is the community support for crystal open source? I’d love to see how it is implemented.

Please read Building a Crystal Project - Travis CI

Your configuration is invalid because you specify crystal: [latest] in an element of jobs.include.

I don’t know how to proceed. How to test on latest and nightly using jobs.include then?