Skip to content

FED-279: Add improved prop forwarding method #708

FED-279: Add improved prop forwarding method

FED-279: Add improved prop forwarding method #708

Workflow file for this run

name: Dart CI
on:
push:
branches:
- 'master'
- 'test_consume_*'
pull_request:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Can't run on `dev` (Dart 3) until we're fully null-safe.
# We can't run on Dart >=2.19 until https://github.com/dart-lang/sdk/issues/51128
# is fixed, or we work around it, which requires upgrading to analyzer ^5.1.0.
sdk: [ 2.13.4, 2.18.7 ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart SDK version
run: dart --version
- id: install
name: Install dependencies
run: dart pub get
- name: Validate dependencies
run: dart run dependency_validator
if: always() && steps.install.outcome == 'success'
- name: Verify formatting
run: dart run dart_dev format --check
if: always() && matrix.sdk == '2.7.2' && steps.install.outcome == 'success'
# Analyze before generated files are created to verify that component boilerplate analysis is "clean" without the need for building
- name: Analyze example source (pre-build)
run: |
# Analyze lib to ensure public APIs don't depend on build-to-cache files,
# which could cause analysis issues for consumers who haven't run a build yet.
dart analyze lib
dart analyze example/boilerplate_versions
if: always() && steps.install.outcome == 'success'
- id: build
timeout-minutes: 6
name: Build generated files / precompile DDC assets
run: |
dart pub run build_runner build --delete-conflicting-outputs -o ddc_precompiled
if [ ${{ matrix.sdk }} = '2.18.7' ]; then
git diff --exit-code
else
# Don't check these generated files for other SDKs, since they may generate differently
# due to different resolved dependencies.
git diff --exit-code -- ":(exclude)test/mockito.mocks.dart" ":(exclude)test/over_react/component_declaration/redux_component_test/test_reducer.g.dart"
fi
if: always() && steps.install.outcome == 'success'
# Analyze again after generated files are created to verify that those generated classes don't cause analysis errors
- name: Analyze project source (post-build)
run: dart analyze
if: always() && steps.install.outcome == 'success' && steps.build.outcome == 'success'
- name: Run tests (VM)
# Can't use build_runner (which dart_dev uses if you depend on it) to run VM tests, since we get the error:
# Unable to spawn isolate: /…/build_runner_testRU6M77/.packages: Error: Problem in packages configuration file: Unexpected character
run: dart test -P vm
if: always() && steps.install.outcome == 'success' && steps.build.outcome == 'success'
- name: Run tests (DDC)
run: dart test --precompiled ddc_precompiled -P dartdevc
if: always() && steps.install.outcome == 'success' && steps.build.outcome == 'success'
- name: Run tests (dart2js)
run: dart pub run dart_dev test --build-args="-r" -P dart2js
if: always() && steps.install.outcome == 'success' && steps.build.outcome == 'success'
validate_analyzer:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Can't run on `dev` (Dart 3) until we're fully null-safe.
# We can't run on Dart >=2.19 until https://github.com/dart-lang/sdk/issues/51128
# is fixed, or we work around it, which requires upgrading to analyzer ^5.1.0.
sdk: [ 2.13.4, 2.18.7 ]
analyzer:
- ^1.0.0
- ^2.0.0
# Don't validate analyzer ^2.0.0 in 2.13.4 since it can't resolve.
exclude:
- sdk: 2.13.4
analyzer: ^2.0.0
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart SDK version
run: dart --version
- name: Update analyzer constraint to ${{ matrix.analyzer }} and validate `pub get` can resolve
id: resolve
run: |
dart tool/set_analyzer_constraint.dart "${{ matrix.analyzer }}"
# Show the updated version constraint
git diff pubspec.yaml
dart pub get
- name: Analyze package source
run: dart analyze .
- name: Verify builder runs without errors
run: dart run build_runner build --build-filter='**.dart' --delete-conflicting-outputs
- name: Run builder tests
run: dart run test -p vm -- test/vm_tests/builder
analyzer_plugin:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./tools/analyzer_plugin
strategy:
fail-fast: false
matrix:
# Can't run on `stable` (Dart 3) until we're fully null-safe.
sdk: [ 2.18.7, 2.19.6 ]
steps:
- uses: actions/checkout@v2
- uses: dart-lang/[email protected]
with:
sdk: ${{ matrix.sdk }}
- name: Print Dart SDK version
run: dart --version
- id: link
name: Override over_react dependency with local path
run: cd ../.. && dart pub get && dart tool/travis_link_plugin_deps.dart
- id: install
name: Install dependencies
run: dart pub get
if: always() && steps.link.outcome == 'success'
- name: Validate dependencies
run: dart run dependency_validator
if: always() && steps.install.outcome == 'success'
- name: Verify formatting
run: dart pub run dart_dev format --check
if: always() && matrix.sdk == '2.7.2' && steps.install.outcome == 'success'
- name: Run tests
run: dart pub run dart_dev test
if: always() && steps.install.outcome == 'success'