improve travis support
diff --git a/.travis.yml b/.travis.yml
index 1fffdc4..e7ceaba 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,17 +1,19 @@
 language: dart
+sudo: false
 dart:
   - dev
-
-script: ./tool/travis.sh
-
-# Speed up builds by using containerization. Disable this if you need to use
-# sudo in your scripts.
-sudo: false
-
-branches:
-  only:
-    - master
-
+  - stable
+  - 1.22.1
+  - 1.21.1
 cache:
   directories:
-  - $HOME/.pub-cache
+    - $HOME/.pub-cache
+dart_task:
+  - test: --platform vm
+  - dartanalyzer
+matrix:
+  include:
+    # Only validate formatting using the dev release
+    # Formatted with 1.23.0-dev.10.0 which has (good) changes since 1.22.1
+    - dart: dev
+      dart_task: dartfmt
diff --git a/tool/travis.sh b/tool/travis.sh
deleted file mode 100755
index e0a8098..0000000
--- a/tool/travis.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2015, the Dart project authors.  Please see the AUTHORS file
-# for details. All rights reserved. Use of this source code is governed by a
-# BSD-style license that can be found in the LICENSE file.
-
-# Fast fail the script on failures.
-set -e
-
-# Verify that the libraries are error free.
-dartanalyzer --fatal-warnings \
-  lib/**/*.dart \
-  test/*.dart
-
-# Run the tests.
-pub run test