blob: a621cdb3458bd12f90b408596c6158c80881d213 [file] [log] [blame]
name: Dart
on:
# Run CI on pushes to the master branch, and on PRs against master.
push:
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
schedule:
- cron: "0 0 * * *" # Every day at midnight
jobs:
# Check code formating, static analysis, and build on a single OS (linux)
# against Dart stable and beta.
analyze:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [dev,beta,stable]
steps:
- uses: actions/checkout@v2
- uses: cedx/setup-dart@v2
with:
release-channel: ${{ matrix.sdk }}
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler redis
- name: Report version
run: dart --version
- name: Install dependencies
run: dart pub get
- name: Analyze code (lib and test)
run: dart analyze --fatal-infos .
- name: Analyze code (example)
run: |
cd example
echo [Analyzing example]
dart pub get
dart analyze --fatal-infos .
- name: Prepare Flutter
run: |
git submodule init
git submodule update
export PATH=$PATH:$PWD/flutter/bin
flutter doctor -v
flutter config --enable-web
- name: Run tests
run: |
export PATH=$PATH:$HOME/.pub-cache/bin
dart pub global activate protoc_plugin
./tool/travis.sh