chore: Separate builder code so we can build aot #662
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 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.5.3" | |
- uses: bluefireteam/melos-action@v3 | |
- name: Bootstrap | |
run: | | |
dart pub global activate melos | |
melos bootstrap | |
- name: Check formatting | |
run: dart format . --line-length=120 --set-exit-if-changed | |
- name: Check linting | |
run: 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.5.3" | |
- uses: bluefireteam/melos-action@v3 | |
- name: Prepare Workspace | |
run: | | |
dart pub global activate melos | |
melos bootstrap | |
cd packages/yaroorm_test && dart run build_runner build --delete-conflicting-outputs | |
dart run yaroorm_cli init | |
- name: Run Unit Tests | |
run: | | |
cd packages/yaroorm_test | |
dart test --coverage=coverage --fail-fast | |
- name: Run E2E Tests | |
run: ./e2e_test.sh | |
- name: Combine Coverage | |
run: | | |
cd packages/yaroorm_test | |
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: packages/yaroorm_test/coverage/*_lcov.info |