chore: Generate coverage reports and upload them. #350
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: supabase | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/supabase/**' | |
- '.github/workflows/supabase.yml' | |
- 'packages/functions_client/**' | |
- 'packages/gotrue/**' | |
- 'packages/postgrest/**' | |
- 'packages/realtime_client/**' | |
- 'packages/storage_client/**' | |
pull_request: | |
paths: | |
- 'packages/supabase/**' | |
- '.github/workflows/supabase.yml' | |
- 'packages/functions_client/**' | |
- 'packages/gotrue/**' | |
- 'packages/postgrest/**' | |
- 'packages/realtime_client/**' | |
- 'packages/storage_client/**' | |
jobs: | |
test: | |
name: Test SDK ${{ matrix.sdk }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
sdk: [stable, beta, dev] | |
defaults: | |
run: | |
working-directory: packages/supabase | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checks-out repo | |
uses: actions/checkout@v4 | |
- name: Setup Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Bootstrap workspace | |
run: | | |
cd ../../ | |
dart pub global activate melos | |
melos bootstrap --no-flutter | |
- name: dartfmt | |
if: ${{ matrix.sdk == 'stable'}} | |
run: dart format lib test -l 80 --set-exit-if-changed | |
- name: analyzer | |
run: dart analyze --fatal-warnings --fatal-infos . | |
- name: Run tests | |
run: dart test --concurrency=1 --coverage=./coverage | |
- name: Update coverage | |
run: | | |
dart pub global activate combine_coverage | |
melos run update-coverage | |
dart pub global run combine_coverage --repo-path="../../" | |
- name: Upload coverage results to Coveralls | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./coverage/lcov.info |