blob: cf1705e9f696637ba6ad74cdc20479e01a48d45a [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:
include:
- sdk: dev
allow_failure: true
- sdk: beta
allow_failure: true
- sdk: stable
allow_failure: false
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 .
- name: Analyze code (example)
run: |
cd example
echo [Analyzing example]
dart pub get
dart analyze .
- 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
continue-on-error: ${{ matrix.allow_failure }}