-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: add melos, test in CI, add codecov (#16)
* add melos * update ci name * update README files * fix links
- Loading branch information
Showing
9 changed files
with
129 additions
and
60 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: Test & Build | ||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
name: Build Android | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Install melos | ||
run: dart pub global activate melos | ||
- name: Install coverde | ||
run: dart pub global activate coverde | ||
- name: Bootstrap melos | ||
run: melos bootstrap | ||
- name: Run tests with coverage | ||
run: melos run test_with_coverage --no-select | ||
- name: Run Codecov | ||
uses: codecov/codecov-action@v3 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | ||
build-android: | ||
runs-on: ubuntu-latest | ||
name: Build Android | ||
needs: [ test ] | ||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
- name: Setup Java | ||
uses: actions/setup-java@v2 | ||
with: | ||
distribution: 'zulu' | ||
java-version: '21' | ||
- name: Setup Flutter | ||
uses: subosito/flutter-action@v2 | ||
with: | ||
channel: "stable" | ||
- name: Build APK | ||
working-directory: example | ||
run: flutter build apk | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: apk | ||
path: example/build/app/outputs/flutter-apk/app-release.apk |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,3 +32,4 @@ build/ | |
|
||
# ignore coverage info | ||
**/coverage/lcov.info | ||
coverage/filtered.lcov.info |
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: flutter_map_plugins | ||
packages: | ||
- flutter_map_* | ||
- vector_map_tiles_* | ||
|
||
scripts: | ||
analyze: | ||
description: Run `dart analyze` in all packages | ||
run: melos exec dart analyze . | ||
test: | ||
description: Run tests of all packages | ||
run: melos exec --dir-exists="test" --fail-fast flutter test --no-pub | ||
test_with_coverage: | ||
description: Run tests of all packages with coverage and merge its results | ||
run: | | ||
melos exec rm -rf coverage | ||
melos exec --dir-exists="test" --fail-fast flutter test --no-pub -r expanded --coverage | ||
melos exec -c 1 --file-exists=coverage/lcov.info coverde filter --input ./coverage/lcov.info --output MELOS_ROOT_PATH/coverage/filtered.lcov.info --filters \.g\.dart | ||
coverde value -i coverage/filtered.lcov.info > MELOS_ROOT_PATH/coverage/result.txt |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
name: flutter_map_plugins | ||
|
||
environment: | ||
sdk: ">=2.18.0 <3.0.0" | ||
|
||
dev_dependencies: | ||
melos: ^4.0.0 |
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