chore: setup project deployment #63
Workflow file for this run
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 workflow uses actions that are not certified by GitHub. | |
# They are provided by a third-party and are governed by | |
# separate terms of service, privacy policy, and support | |
# documentation. | |
name: Test | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
analyze: | |
name: Analyze Code | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- uses: dart-lang/[email protected] | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.16.5" | |
channel: "stable" | |
- uses: bluefireteam/melos-action@v3 | |
- name: Bootstrap | |
run: melos build:backend | |
- name: Check formatting | |
run: melos format | |
- name: Check linting | |
run: melos analyze | |
test: | |
name: Run Tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- uses: dart-lang/[email protected] | |
- uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: "3.16.5" | |
channel: "stable" | |
- uses: bluefireteam/melos-action@v3 | |
- name: Bootstrap | |
run: | | |
melos build:backend | |
dart pub global activate coverage | |
- name: Setup Test Database | |
run: dart run ./bin/tools/migrator.dart migrate | |
- name: Run Tests | |
run: | | |
melos tests:ci | |
dart pub global run coverage:format_coverage --check-ignore --report-on=lib --lcov -o lcov.info -i ./coverage | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: lcov.info |