All-in-one Flutter CI Action to run analyzer, tests, and check outdated packages — with optional PR comments to keep your team in sync.
- Detects code issues using
flutter analyze. - Provides a summary and list of lint issues in the CI report (PR comment).
- Identifies outdated dependencies with
flutter pub outdated. - Provides a summary and list of outdated packages in the CI report (PR comment).
- Runs unit and widget tests with
flutter test. - Provides a code coverage summary and list of test results in the CI report (PR comment).
- Posts a detailed CI report as a comment on pull requests (optional).
| Input Name | Description | Type | Required | Default |
|---|---|---|---|---|
check_outdated |
Check for outdated dependencies using flutter pub outdated. |
bool | No | true |
analyze |
Run Dart static analysis and linter checks via flutter analyze. |
bool | No | true |
run_tests |
Run unit and widget tests from the test/ directory using flutter test. |
bool | No | true |
comment_pr |
Post a CI summary as a comment on pull requests. | bool | No | true |
github_token |
GitHub token for authentication, required only for posting PR comments. | string | No |
-
Exit Code 0: This code indicates successful execution of the action.
-
Exit Code 1: This code indicates errors encountered during execution.
Below are usage examples on how to use the Flutter CI Checks action in your GitHub workflows.
- name: Run Flutter CI Checks
uses: DevGlitch/flutter-ci-checks@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }} - name: Run Flutter CI Checks
uses: DevGlitch/flutter-ci-checks@v1
with:
check_outdated: true
analyze: true
run_tests: true
comment_pr: true
github_token: ${{ secrets.GITHUB_TOKEN }}The Flutter CI Checks GitHub Action is a versatile tool designed to enhance your CI/CD pipeline by providing essential checks at critical stages of development and deployment. Below are detailed examples of how to integrate this action into workflows for pull requests and deployments, ensuring your Flutter app and code are always maintained at the highest.
Integrating the Flutter CI Checks into the PR review process ensures that all code changes are thoroughly reviewed and validated before being merged into the main branch. This helps maintain code quality, catch potential issues early, and foster collaboration among team members.
Here's an example workflow for pull requests:
name: Flutter CI Checks
on:
pull_request:
jobs:
flutter-ci:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: stable
- name: Run Flutter CI Checks
uses: DevGlitch/flutter-ci-checks@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
Please note that the Flutter setup step is necessary to ensure the action has access to the Flutter SDK and
can run the required commands. However, you are free to customize the setup step according to your project's
specific needs. For example, you can setup Flutter with a FVM version using an action like
kuhnroyal/flutter-fvm-config-action/setup@v3.0 or any other method that suits your workflow.
This is a feature we may consider adding in the future. PRs are welcome!
If you encounter any errors or issues while using the Flutter CI Checks GitHub Action, here are some steps you can take to troubleshoot:
- Check Action Output: Review the logs in your GitHub Actions workflow run.
- Verify Configuration: Ensure the inputs in your workflow file are correctly specified.
- Open an Issue: If the problem persists, open an issue in the repository with details about the error.
This project is licensed under the Apache license 2.0 License. See the LICENSE file for details.
You are welcome to contribute to this project by submitting a pull request. If you have any suggestions or problems, please open an issue. Thank you!
To contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bug fix.
- Submit a pull request with a detailed description of your changes.
Your support keeps this project going!
- ⭐️ Star: Show your appreciation by giving this project a star.
- ☕️ Buy Me a Coffee: Contribute by buying a virtual coffee.
- 💼 Sponsor This Project: Consider sponsoring for ongoing support.
Making a difference, one line of code at a time...