Merge pull request #43 from google/use_actions
switch to github actions
diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml
new file mode 100644
index 0000000..8dc3ec0
--- /dev/null
+++ b/.github/workflows/build.yaml
@@ -0,0 +1,37 @@
+name: Dart
+
+on:
+ pull_request:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ container:
+ image: google/dart:dev
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: pub get
+ run: pub get
+
+ - name: dart format
+ run: dart format --output=none --set-exit-if-changed .
+
+ - name: dart analyze
+ run: dart analyze --fatal-infos
+
+ # Set up some test data.
+ - name: Set up test data
+ run: ./tool/setup.sh
+
+ - name: dart test
+ run: dart test
+
+ # Ensure the example works
+ - name: Test example/list.dart
+ run: dart example/list.dart
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 084f38e..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,18 +0,0 @@
-language: dart
-dart:
- - dev
- - stable
-
-install: ./tool/travis-setup.sh
-
-jobs:
- include:
- - stage: test
- script: ./tool/travis.sh
- env: PUB_HOSTED_URL=https://pub.flutter-io.cn
- - stage: test
- script: ./tool/travis.sh
-
-branches:
- only:
- - master
diff --git a/test/all.dart b/test/all.dart
deleted file mode 100644
index 8e9bab0..0000000
--- a/test/all.dart
+++ /dev/null
@@ -1,9 +0,0 @@
-// Copyright (c) 2014, Google Inc. 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.
-
-import 'pub_cache_test.dart' as pub_cache_test;
-
-void main() {
- pub_cache_test.defineTests();
-}
diff --git a/tool/travis-setup.sh b/tool/setup.sh
similarity index 100%
rename from tool/travis-setup.sh
rename to tool/setup.sh
diff --git a/tool/travis.sh b/tool/travis.sh
deleted file mode 100755
index 9b13eb8..0000000
--- a/tool/travis.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-# Copyright (c) 2014, Google Inc. 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.
-
-set -e
-
-# Verify that the libraries are error free.
-dartanalyzer --fatal-warnings .
-
-# Ensure the example works.
-dart example/list.dart
-
-# Run the tests.
-dart test/all.dart