🔀 Merge pull request #382 from COS301-SE-2024/dev/feat/fe_changes #14
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: 📄 Generate coverage for both 🥅 dotnet and 🦚 Flutter | |
on: | |
push: | |
branches: | |
- main | |
- development | |
- '**devops**' | |
- '**test**' | |
paths: | |
- 'beakpeek/**' | |
- 'dotnet/BirdApi' | |
- '.github/workflows/coverage.yml' | |
workflow_call: | |
workflow_dispatch: | |
# Don't forget that "!" is used to check if something is set | |
jobs: | |
flutter-coverage: | |
name: 🦚 Flutter Coverage | |
uses: ./.github/workflows/flutter.yml | |
with: | |
upload-coverage: true # this has to be true to not upload coverage | |
secrets: inherit | |
dotnet-coverage: | |
name: 🥅 Dotnet Coverage | |
uses: ./.github/workflows/dotnet.yml | |
with: | |
upload-coverage: true | |
secrets: inherit | |
upload-coverage: | |
runs-on: ubuntu-latest | |
name: 📔 Upload to codecov | |
needs: [flutter-coverage, dotnet-coverage] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Get Flutter Code Coverage | |
uses: actions/download-artifact@v4 | |
id: get-flutter-coverage | |
with: | |
name: flutter-code-coverage-${{hashFiles('beakpeek/pubspec.lock')}} | |
- name: Get Dotnet Code Coverage | |
uses: actions/download-artifact@v4 | |
id: get-dotner-coverage | |
with: | |
name: dotnet-code-coverage-${{hashFiles('dotnet/BirdApi/BeakPeekApi/packages.lock.json', 'dotnet/BirdApi/BeakPeekApi.Tests/packages.lock.json')}} | |
- name: Upload coverage | |
# if: ${{ !env.ACT }} | |
uses: codecov/codecov-action@v4 | |
with: | |
files: ./lcov.info, ./coverage.cobertura.xml | |
token: ${{ secrets.CODECOV_TOKEN }} | |
fail_ci_if_error: true | |
verbose: true | |
name: BeakPeek Coverage |