Skip to content

feat: v0.0.2 release (#76) #644

feat: v0.0.2 release (#76)

feat: v0.0.2 release (#76) #644

Workflow file for this run

# 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.3.1"
- name: Bootstrap
run: dart pub get
- 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.3.1"
- name: Prepare Workspace
run: |
dart pub get
dart pub global activate coverage
cd _tests_
dart run build_runner build --delete-conflicting-outputs
dart run yaroorm init
- name: Run Unit Tests
run: |
cd _tests_
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