V 3 5 0 dev.1 #75
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
# This GitHub actions runs on push to master, it: | |
# - Installs Dart and flutter | |
# - Uses Flutter beta channel for now, might make a matrix later with other channels included too. | |
# - Gets package dependencies | |
# - Runs dart analyze, allows deprecation warnings, we on purpose allow use of deprecated features for now. | |
# - Show outdated packages, just added for info. | |
# - Verify that dart format is used by all committed code, fails if not. Controversial but pub.dev penalizes you if | |
# dart format is not used. | |
# - Run all tests with coverage. | |
# - Upload code coverage output to Codecov for analysis. | |
name: Test | |
on: | |
push: | |
branches: [none] | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: [master] | |
paths-ignore: | |
- "**.md" | |
jobs: | |
run_tests: | |
name: Analyze and run all tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install Flutter and Dart SDK | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: "beta" | |
- name: Show Dart SDK version | |
run: dart --version | |
- name: Show Flutter SDK version | |
run: flutter --version | |
- name: Install Flutter package dependencies | |
run: flutter pub get | |
- name: Analyze Dart source | |
run: dart analyze | |
- name: Show outdated packages | |
run: flutter pub outdated | |
- name: Verify that Dart formatting is used, fail if not | |
run: dart format --output=none --set-exit-if-changed . | |
- name: Test package FlexColorPicker with test coverage | |
run: flutter test --coverage | |
- name: Upload test coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
file: coverage/lcov.info |