fix: fix how gRPC transport security is determined #569
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: Test | |
# Tests workflow runs unit tests and uploads a code coverage report | |
# This workflow is run on pushes to main and every pull requests where a .dart, .mod, .sum have been changed | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
Unit-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
- name: Setup 🔨 | |
uses: dart-lang/[email protected] | |
with: | |
sdk: 3.0.0 | |
- name: Get dependencies 📥 | |
run: dart pub get | |
- name: Compute diff 📜 | |
uses: technote-space/[email protected] | |
with: | |
PATTERNS: | | |
**/**.dart | |
pubspec.yaml | |
- name: Test 🔧 | |
if: env.GIT_DIFF | |
run: | | |
dart pub global activate coverage | |
dart pub global run coverage:test_with_coverage | |
- name: Clean coverage 🧹 | |
if: env.GIT_DIFF | |
run: | | |
dart pub global activate remove_from_coverage | |
# Exclude the .pub-cache | |
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '/.pub-cache/' | |
# Exclude all g.dart files | |
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '.g.dart$' | |
# Exclude the proto files | |
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '/lib/proto/' | |
# Exclude the test folder | |
dart pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r '/test/' | |
- name: Upload coverage 📤 | |
if: env.GIT_DIFF | |
uses: codecov/codecov-action@v3 | |
with: | |
file: coverage/lcov.info | |
fail_ci_if_error: true |