Tiny fix #540
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 Pipeline | |
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/setup-dart@v1.3 | |
with: | |
sdk: "3.0.0" | |
- name: Bootstrap | |
run: | | |
dart pub get | |
cd _tests_ && dart pub get | |
- name: Check formatting | |
run: dart format . --line-length=120 --set-exit-if-changed | |
- name: Check linting | |
run: | | |
cd _tests_ && dart run build_runner build --delete-conflicting-outputs && cd .. | |
dart analyze . --fatal-infos --no-fatal-warnings | |
test: | |
name: Test Packages | |
runs-on: ubuntu-latest | |
services: | |
mariadb: | |
image: mariadb | |
env: | |
MARIADB_DATABASE: test_db | |
MARIADB_USER: tester | |
MARIADB_PASSWORD: password | |
MARIADB_ROOT_PASSWORD: password | |
ports: | |
- 3000:3306 | |
mysqldb: | |
image: mysql | |
env: | |
MYSQL_USER: 'tester' | |
MYSQL_DATABASE: test_db | |
MYSQL_PASSWORD: 'password' | |
MYSQL_ROOT_PASSWORD: 'password' | |
ports: | |
- 3001:3306 | |
postgresdb: | |
image: postgres:latest | |
env: | |
POSTGRES_DB: test_db | |
POSTGRES_PASSWORD: password | |
POSTGRES_USER: tester | |
ports: | |
- 3002:5432 | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- uses: dart-lang/setup-dart@v1.3 | |
with: | |
sdk: "3.0.0" | |
- name: Prepare Workspace | |
run: | | |
dart pub get | |
dart pub global activate coverage | |
- name: Run Unit Tests | |
run: | | |
cd _tests_ | |
dart run build_runner build --delete-conflicting-outputs | |
dart test --coverage=coverage --fail-fast | |
- name: Run E2E Tests | |
run: ./e2e_test.sh | |
- name: Combine Coverage | |
run: | | |
cd _tests_ | |
dart pub global run coverage:format_coverage --check-ignore --report-on=lib --lcov -o "coverage/yaroorm_lcov.info" -i ./coverage | |
rm -rf coverage | |
- name: Upload Coverage | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} | |
with: | |
files: _tests_/coverage/*_lcov.info |