platform/.github/workflows/dart.yml

168 lines
5.4 KiB
YAML
Raw Normal View History

2022-01-08 04:37:05 +00:00
# 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:
2022-01-08 07:38:18 +00:00
job_001:
2022-01-08 04:37:05 +00:00
name: Validate framework package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
2023-06-08 16:27:36 +00:00
sdk: "3.0.3"
2022-01-23 05:10:50 +00:00
- id: angel3_container_upgrade
name: angel3_container; Upgrade depedencies
working-directory: packages/container/angel_container
run: dart pub upgrade
- name: angel3_container; Verify formatting
working-directory: packages/container/angel_container
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
- name: angel3_container; Analyze source code
working-directory: packages/container/angel_container
run: dart analyze
- name: angel3_container; Run tests
working-directory: packages/container/angel_container
run: dart test
2022-01-08 04:37:05 +00:00
2022-01-08 06:03:19 +00:00
- id: angel3_framework_upgrade
2022-01-08 06:36:42 +00:00
name: angel3_framework; Upgrade depedencies
2022-01-08 04:37:05 +00:00
working-directory: packages/framework
run: dart pub upgrade
2022-01-08 06:03:19 +00:00
- name: angel3_framework; Verify formatting
2022-01-08 04:37:05 +00:00
working-directory: packages/framework
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
2022-01-08 06:03:19 +00:00
- name: angel3_framework; Analyze source code
2022-01-08 04:37:05 +00:00
working-directory: packages/framework
2022-01-08 07:49:43 +00:00
run: dart analyze
2022-01-08 04:37:05 +00:00
2022-01-08 06:03:19 +00:00
- name: angel3_framework; Run tests
2022-01-08 04:37:05 +00:00
working-directory: packages/framework
run: dart test
2022-01-08 05:23:54 +00:00
2022-01-08 07:38:18 +00:00
job_002:
2022-01-08 05:23:54 +00:00
name: Validate ORM packages
runs-on: ubuntu-latest
2022-01-08 07:38:18 +00:00
# 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
2022-01-08 05:23:54 +00:00
steps:
- uses: actions/checkout@v2
- uses: dart-lang/setup-dart@v1
with:
2023-06-08 16:27:36 +00:00
sdk: "3.0.3"
2022-01-08 05:23:54 +00:00
2022-01-08 06:03:19 +00:00
# Angel3 ORM
- id: angel3_orm_upgrade
2022-01-08 06:36:42 +00:00
name: angel3_orm; Upgrade depedencies
2022-01-08 05:23:54 +00:00
working-directory: packages/orm/angel_orm
run: dart pub upgrade
2022-01-08 06:03:19 +00:00
- name: angel3_orm; Verify formatting
2022-01-08 05:52:34 +00:00
working-directory: packages/orm/angel_orm
2022-01-08 05:23:54 +00:00
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
2022-01-08 06:03:19 +00:00
- name: angel3_orm; Analyze source code
2022-01-08 05:52:34 +00:00
working-directory: packages/orm/angel_orm
2022-01-08 07:49:43 +00:00
run: dart analyze
2022-01-08 05:23:54 +00:00
2022-01-08 06:03:19 +00:00
# Angel3 ORM Generator
- id: angel3_orm_generator_upgrade
2022-01-08 06:36:42 +00:00
name: angel3_orm_generator; Upgrade depedencies
2022-01-08 06:03:19 +00:00
working-directory: packages/orm/angel_orm_generator
run: dart pub upgrade
2022-01-08 06:36:42 +00:00
- name: angel3_orm_generator; Verify formatting
2022-01-08 06:03:19 +00:00
working-directory: packages/orm/angel_orm_generator
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
2022-01-08 06:36:42 +00:00
- name: angel3_orm_generator; Analyze source code
2022-01-08 06:03:19 +00:00
working-directory: packages/orm/angel_orm_generator
2022-01-08 07:49:43 +00:00
run: dart analyze
2022-01-08 06:03:19 +00:00
2022-01-08 06:20:42 +00:00
# Angel3 ORM Test
- id: angel3_orm_test_upgrade
2022-01-08 06:36:42 +00:00
name: angel3_orm_test; Upgrade depedencies
2022-01-08 06:20:42 +00:00
working-directory: packages/orm/angel_orm_test
run: dart pub upgrade
2022-01-08 06:36:42 +00:00
- 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
2022-01-08 06:20:42 +00:00
working-directory: packages/orm/angel_orm_test
run: dart format --output=none --set-exit-if-changed .
# Consider passing '--fatal-infos' for slightly stricter analysis.
2022-01-08 06:36:42 +00:00
- name: angel3_orm_test; Analyze source code
2022-01-08 06:20:42 +00:00
working-directory: packages/orm/angel_orm_test
2022-01-08 07:49:43 +00:00
run: dart analyze
2022-01-08 06:20:42 +00:00
2022-01-08 06:59:52 +00:00
# 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
2022-01-08 07:49:43 +00:00
run: dart analyze
2022-01-08 06:59:52 +00:00
2022-01-08 07:38:18 +00:00
- name: angel3_orm_postgres; Run tests
2022-01-08 07:49:43 +00:00
working-directory: packages/orm/angel_orm_postgres
2022-01-08 07:38:18 +00:00
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
2022-01-08 07:49:43 +00:00
POSTGRES_DB: postgres