Skip to content

Instantly share code, notes, and snippets.

@tianhaoz95
Created October 12, 2019 06:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tianhaoz95/706f60b15581888951fb554e124613c5 to your computer and use it in GitHub Desktop.
Save tianhaoz95/706f60b15581888951fb554e124613c5 to your computer and use it in GitHub Desktop.
Do Flutter unit test and lint in GitHub Actions
name: Unit test and lint
on: [push, pull_request]
jobs:
lint-and-test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '12.x'
- uses: subosito/flutter-action@v1
with:
flutter-version: '1.9.1+hotfix.2'
channel: 'stable'
- name: Upgrade flutter
run: |
flutter channel master
flutter upgrade
- name: Install packages
run: |
cd ./rock_paper_scissors
flutter pub get
- name: Lint
run: |
cd ./rock_paper_scissors
flutter analyze
- name: Unit test
run: |
cd ./rock_paper_scissors
flutter test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment