chore: update readme (#18) #7
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 & 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 |