Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Continuous Integration with Travis #60

Open
1 task
SimonLab opened this issue Jun 17, 2020 · 2 comments
Open
1 task

Continuous Integration with Travis #60

SimonLab opened this issue Jun 17, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@SimonLab
Copy link
Member

The following question contains some links and examples of .travis.yml files:
https://stackoverflow.com/questions/60493958/flutter-integration-tests-with-travis-ci

@SimonLab SimonLab added the enhancement New feature or request label Jun 17, 2020
@SimonLab
Copy link
Member Author

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

@SimonLab
Copy link
Member Author

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant