Migrate to GitHub Actions (#53) * Migrate to GitHub Actions * Delete .travis.yml * Run `pub get` in travis.sh * Rename job to test
diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml new file mode 100644 index 0000000..04eaf61 --- /dev/null +++ b/.github/workflows/test-package.yml
@@ -0,0 +1,29 @@ +name: Dart CI + +on: + # Run on PRs and pushes to the default branch. + push: + branches: [ master ] + pull_request: + branches: [ master ] + schedule: + - cron: "0 0 * * 0" + +env: + PUB_ENVIRONMENT: bot.github + +jobs: + # Run the test script against the latest dev build. + test: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + sdk: [dev] + steps: + - uses: actions/checkout@v2 + - uses: dart-lang/setup-dart@v0.1 + with: + channel: ${{ matrix.sdk }} + - name: Test + run: ./tool/travis.sh
diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f21e9b1..0000000 --- a/.travis.yml +++ /dev/null
@@ -1,18 +0,0 @@ -language: dart - -script: ./tool/travis.sh - -dart: - - dev - -# Speed up builds by using containerization. Disable this if you need to use -# sudo in your scripts. -sudo: false - -branches: - only: - - master - -cache: - directories: - - $HOME/.pub-cache
diff --git a/tool/travis.sh b/tool/travis.sh index bccd424..342a48f 100755 --- a/tool/travis.sh +++ b/tool/travis.sh
@@ -7,6 +7,8 @@ # Fast fail the script on failures. set -e +pub get + # Verify that the libraries are error free. dartanalyzer --fatal-infos --fatal-warnings \ lib/bazel_worker.dart \