Update release.yml #25
This file contains hidden or 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: Flutter CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - docs/** | |
| - docs.json | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - docs/** | |
| - docs.json | |
| # Cancel any in-progress runs of the same workflow for the same PR/branch. | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| strategy: | |
| # Keep running other jobs in the matrix even if one fails. | |
| fail-fast: false | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: 'stable' | |
| flutter-version: 3.35.0 | |
| cache: true | |
| - name: Install root dependencies | |
| run: flutter pub get && cd demo && flutter pub get | |
| - name: Analyze root project | |
| run: flutter analyze | |
| - name: Install DCM | |
| uses: CQLabs/setup-dcm@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Run DCM | |
| run: dcm analyze . | |
| shell: bash | |
| - name: Run root tests | |
| run: flutter test --coverage | |
| - name: Setup LCOV | |
| uses: hrishikesh-kadam/setup-lcov@v1 | |
| with: | |
| ref: v2.3 | |
| - name: Report Code Coverage | |
| uses: zgosalvez/github-actions-report-lcov@v4 | |
| with: | |
| coverage-files: coverage/lcov.info | |
| minimum-coverage: 5 | |
| artifact-name: code-coverage-report | |
| github-token: ${{ secrets.GITHUB_TOKEN }} |