Created
October 12, 2019 06:58
-
-
Save tianhaoz95/706f60b15581888951fb554e124613c5 to your computer and use it in GitHub Desktop.
Do Flutter unit test and lint in GitHub Actions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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