Skip to content

Converge melos usage and CI scripts & add code coverage #1096

Converge melos usage and CI scripts & add code coverage

Converge melos usage and CI scripts & add code coverage #1096

Workflow file for this run

name: Verify packages abilities
on:
push:
branches:
- main
- '6.0.0'
paths-ignore:
- "**.md"
pull_request:
branches:
- main
- '6.0.0'
paths-ignore:
- "**.md"
# Ensure that new pushes/updates cancel running jobs
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
defaults:
run:
shell: bash -leo pipefail {0}
jobs:
workflows:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
sdk: [ min, stable, beta ]
env:
TEST_PRESET: all
steps:
- uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
cache: true
flutter-version: ${{ matrix.sdk == 'min' && '2.8.0' || '' }}
channel: ${{ matrix.sdk == 'min' && '' || matrix.channel }}
- run: |
chmod +x ./scripts/prepare_pinning_certs.sh
./scripts/prepare_pinning_certs.sh
- name: Install proxy for tests
run: sudo apt-get update && sudo apt-get install -y squid
- run: dart pub get
- uses: bluefireteam/melos-action@v3
with:
run-bootstrap: false
- name: Check satisfied packages
run: |
dart ./scripts/melos_packages.dart
echo $(cat .melos_packages) >> $GITHUB_ENV
- name: Melos Bootstrap
run: melos bootstrap
- name: '[Verify step] Format'
if: ${{ matrix.sdk == 'stable' }}
run: melos run format --no-select
- name: '[Verify step] Analyze packages'
if: ${{ matrix.sdk == 'stable' }}
run: melos run analyze --no-select
- name: '[Verify step] Publish dry-run'
if: ${{ matrix.sdk == 'stable' }}
run: melos run publish-dry-run --no-select
- name: '[Verify step] Test Dart packages [VM]'
run: melos run test:dart --no-select
- name: '[Verify step] Test Dart packages [Chrome]'
run: melos run test:web --no-select
env:
TEST_PLATFORM: chrome
- name: '[Verify step] Test Dart packages [Firefox]'
run: melos run test:web --no-select
env:
TEST_PLATFORM: firefox
- name: '[Verify step] Test Flutter packages'
run: melos run test:flutter --no-select
- name: '[Coverage] Format & print test coverage'
if: ${{ matrix.sdk == 'stable' }}
run: melos run coverage:show
- name: '[Coverage] Coverage Report'
uses: clearlyip/code-coverage-report-action@v4
if: ${{ matrix.sdk == 'stable' && github.actor != 'dependabot[bot]'}}
with:
filename: 'coverage/cobertura.xml'