149 lines
4.7 KiB
YAML
149 lines
4.7 KiB
YAML
# 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: Angel3 CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
branches: [ master ]
|
|
|
|
jobs:
|
|
job_001:
|
|
name: Validate framework package
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: dart-lang/setup-dart@v1
|
|
with:
|
|
sdk: "2.15.1"
|
|
|
|
- id: angel3_framework_upgrade
|
|
name: angel3_framework; Upgrade depedencies
|
|
working-directory: packages/framework
|
|
run: dart pub upgrade
|
|
|
|
- name: angel3_framework; Verify formatting
|
|
working-directory: packages/framework
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
|
- name: angel3_framework; Analyze source code
|
|
working-directory: packages/framework
|
|
run: dart analyze
|
|
|
|
- name: angel3_framework; Run tests
|
|
working-directory: packages/framework
|
|
run: dart test
|
|
|
|
job_002:
|
|
name: Validate ORM packages
|
|
runs-on: ubuntu-latest
|
|
|
|
# Service containers to run with `runner-job`
|
|
services:
|
|
# Label used to access the service container
|
|
postgres:
|
|
# Docker Hub image
|
|
image: postgres
|
|
# Provide the password for postgres
|
|
env:
|
|
POSTGRES_PASSWORD: postgres
|
|
# Set health checks to wait until postgres has started
|
|
options: >-
|
|
--health-cmd pg_isready
|
|
--health-interval 10s
|
|
--health-timeout 5s
|
|
--health-retries 5
|
|
ports:
|
|
# Maps tcp port 5432 on service container to the host
|
|
- 5432:5432
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- uses: dart-lang/setup-dart@v1
|
|
with:
|
|
sdk: "2.15.1"
|
|
|
|
# Angel3 ORM
|
|
- id: angel3_orm_upgrade
|
|
name: angel3_orm; Upgrade depedencies
|
|
working-directory: packages/orm/angel_orm
|
|
run: dart pub upgrade
|
|
|
|
- name: angel3_orm; Verify formatting
|
|
working-directory: packages/orm/angel_orm
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
|
- name: angel3_orm; Analyze source code
|
|
working-directory: packages/orm/angel_orm
|
|
run: dart analyze
|
|
|
|
# Angel3 ORM Generator
|
|
- id: angel3_orm_generator_upgrade
|
|
name: angel3_orm_generator; Upgrade depedencies
|
|
working-directory: packages/orm/angel_orm_generator
|
|
run: dart pub upgrade
|
|
|
|
- name: angel3_orm_generator; Verify formatting
|
|
working-directory: packages/orm/angel_orm_generator
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
|
- name: angel3_orm_generator; Analyze source code
|
|
working-directory: packages/orm/angel_orm_generator
|
|
run: dart analyze
|
|
|
|
# Angel3 ORM Test
|
|
- id: angel3_orm_test_upgrade
|
|
name: angel3_orm_test; Upgrade depedencies
|
|
working-directory: packages/orm/angel_orm_test
|
|
run: dart pub upgrade
|
|
|
|
- name: angel3_orm_test; Run orm code generator
|
|
working-directory: packages/orm/angel_orm_test
|
|
run: dart run build_runner build --delete-conflicting-outputs
|
|
|
|
- name: angel3_orm_test; Verify formatting
|
|
working-directory: packages/orm/angel_orm_test
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
|
- name: angel3_orm_test; Analyze source code
|
|
working-directory: packages/orm/angel_orm_test
|
|
run: dart analyze
|
|
|
|
# Angel3 ORM PostgreSQL
|
|
- id: angel3_orm_postgres_upgrade
|
|
name: angel3_orm_postgres; Upgrade depedencies
|
|
working-directory: packages/orm/angel_orm_postgres
|
|
run: dart pub upgrade
|
|
|
|
- name: angel3_orm_postgres; Verify formatting
|
|
working-directory: packages/orm/angel_orm_postgres
|
|
run: dart format --output=none --set-exit-if-changed .
|
|
|
|
# Consider passing '--fatal-infos' for slightly stricter analysis.
|
|
- name: angel3_orm_postgres; Analyze source code
|
|
working-directory: packages/orm/angel_orm_postgres
|
|
run: dart analyze
|
|
|
|
- name: angel3_orm_postgres; Run tests
|
|
working-directory: packages/orm/angel_orm_postgres
|
|
run: dart test
|
|
env:
|
|
# The hostname used to communicate with the PostgreSQL service container
|
|
POSTGRES_HOST: localhost
|
|
# The default PostgreSQL port
|
|
POSTGRES_PORT: 5432
|
|
POSTGRES_PASSWORD: postgres
|
|
POSTGRES_USERNAME: postgres
|
|
POSTGRES_DB: postgres
|
|
|