chore: bump pubspec version #49
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
name: CI/Coverage | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
dart-check: | |
name: Coverage Check | |
runs-on: ubuntu-latest | |
steps: | |
- name: π Checkout | |
uses: actions/checkout@v4 | |
- name: π¦ Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: π¦ Install dependencies | |
run: dart pub get | |
- name: π Copy .env.example to .env | |
run: cp .env.example .env | |
- name: π Setup PostgreSQL | |
uses: ikalnytskyi/action-setup-postgres@v6 | |
- name: π¦ Install Prisma | |
run: npm install prisma -g | |
- name: π Push database | |
run: prisma db push | |
- name: π§ͺ Run tests | |
run: | | |
dart run coverage:test_with_coverage | |
sudo apt-get install lcov -y | |
# Keep only entries for handlers/*.dart and services/*.dart files (these are the files actually doing the business logic) | |
lcov --extract coverage/lcov.info "*/handlers/*" "*/services/*" -o coverage/lcov.info | |
continue-on-error: true | |
- name: π Generate Coverage | |
id: coverage-report | |
uses: whynotmake-it/dart-coverage-assistant@v1.1 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
lower_threshold: 60 | |
upper_threshold: 90 | |
compare_against_base: false |