fix: initialize notifications service after auth repo #127
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 and upload coverage | |
on: [push, pull_request] | |
jobs: | |
test-and-upload-coverage: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 2 | |
- name: Get specific changed files | |
id: source-changed | |
uses: tj-actions/changed-files@v41 | |
with: | |
files: | | |
**.dart | |
**/*.dart | |
assets | |
pubspec.yaml | |
analysis_options.yaml | |
codecov.yaml | |
- uses: actions/cache@v2 | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
with: | |
path: ${{ runner.tool_cache }}/flutter | |
key: flutter-3.0.5-stable | |
- uses: subosito/flutter-action@v2 | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
with: | |
channel: "stable" | |
- uses: actions/cache@v2 | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
with: | |
path: ${{ env.PUB_CACHE }} | |
key: flutter-dependencies-v4-${{hashFiles('pubspec.yaml')}} | |
restore-keys: | | |
flutter-dependencies-v4- | |
- name: Install dependencies | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
run: flutter pub get | |
- name: Analyze project source | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
run: flutter analyze --no-fatal-infos | |
- name: Run Tests | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
run: flutter test --coverage --machine > test-results.json | |
- name: Run Tests Expanded | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' && failure() }} | |
run: flutter test --coverage -r expanded | |
- name: Upload Test Report | |
uses: dorny/test-reporter@v1 | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
with: | |
name: Package Tests | |
path: test-results.json | |
reporter: flutter-json | |
- uses: codecov/codecov-action@v2 | |
if: ${{ steps.source-changed.outputs.any_changed == 'true' }} | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} |