Open SimonLab opened 4 years ago
The following .travis.yml
code seems to work for the flutter-todo-list-tutorial:
language: dart
dist: bionic
addons:
install:
- git clone https://github.com/flutter/flutter.git -b stable
- ./flutter/bin/flutter doctor
script:
- ./flutter/bin/flutter test
cache:
directories:
- $HOME/.pub-cache
Github actions can be used as CI: Follow the instruction on https://github.com/subosito/flutter-action to create a Github action for running tests (and other flutter command). For example the following yml file will run analyze and test on every push events:
name: CI
on: push
jobs:
flutter-ci:
name: run tests
runs-on: ubuntu-latest
# see https://github.com/marketplace/actions/flutter-action
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.22.x'
channel: 'stable'
- run: flutter pub get
- run: flutter analyze
- run: flutter test
The following question contains some links and examples of
.travis.yml
files: https://stackoverflow.com/questions/60493958/flutter-integration-tests-with-travis-ci