blob: fd5c0ae86daf1d1f98bd929096dae39103237492 [file] [log] [blame]
name: dart-services
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 formatting, 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: dart-lang/setup-dart@v0.1
with:
channel: ${{ matrix.sdk }}
- name: Install dependencies
run: sudo apt-get install -y protobuf-compiler redis
- name: Install dependencies
run: dart pub get
- name: Analyze code (example/)
run: |
cd example
echo [Analyzing example]
dart pub get
dart analyze --fatal-infos .
- name: Analyze code
run: dart analyze --fatal-infos .
- name: Prepare Flutter
run: |
dart run tool/update_sdk.dart
export PATH=$PATH:$PWD/flutter-sdk/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