Multi line script does not get executed in Travis CI

I have the following job definitions as stages:

jobs:
  include:
  - stage: test
    script: sbt clean coverage test coverageReport
  - stage: docker_push
    script: sbt "set test in assembly := {}" assembly
    script: bash docker_push.sh 
    if: branch = master

As you can see the docker_push stage contains two scripts, but when I take a look at the logs only the second one seems to be running. Why is this? How can I make both the scripts work one after another?

In YAML, the last key-value pair wins if you define more than 1 item with the same key. This is the YAML specification.

If you want to execute multiple commands in script, pass an array.

  - stage: docker_push
    script:
      - sbt "set test in assembly := {}" assembly
      - bash docker_push.sh 
    if: branch = master