fix: set up flutter with channel master #5
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: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
# Declare default permissions as read only. | |
permissions: read-all | |
jobs: | |
unit-test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
# Set up Flutter. | |
- name: Clone Flutter repository with master channel | |
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa | |
with: | |
channel: master | |
- run: flutter doctor -v | |
# Checkout gallery code and get packages. | |
- uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3.6.0 | |
- name: Checkout gallery code | |
working-directory: ./ci_integration | |
run: flutter pub get | |
# Analyze, check formatting, and run unit tests. | |
- name: Analyze | |
working-directory: ./ci_integration | |
run: flutter analyze | |
- name: Ensure the Dart code is formatted correctly | |
working-directory: ./ci_integration | |
run: dart format --set-exit-if-changed . | |
- name: Run Flutter unit tests | |
working-directory: ./ci_integration | |
run: flutter test |