FED-3253 Officially support Dart 3 #342
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
name: Dart CI | |
on: | |
push: | |
branches: | |
- 'master' | |
- 'test_consume_*' | |
pull_request: | |
branches: | |
- '**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
sdk: [2.19.6, 3.2.6, 3.4.4, stable] | |
steps: | |
- uses: actions/checkout@v2 | |
- id: setup-dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: ${{ matrix.sdk }} | |
- name: Print Dart SDK version | |
run: dart --version | |
- name: Delete Dart-2-only files when running on Dart 3 | |
run: | | |
DART_VERSION="${{ steps.setup-dart.outputs.dart-version }}" | |
if [[ "$DART_VERSION" =~ ^3 ]]; then | |
./tool/delete_dart_2_only_files.sh | |
fi | |
- 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: ${{ matrix.sdk == '2.19.6' }} | |
- name: Analyze project source | |
run: dart analyze | |
if: always() && steps.install.outcome == 'success' | |
- name: Run tests (DDC) | |
run: | | |
dart run build_runner test --delete-conflicting-outputs -- --preset dartdevc | |
if: always() && steps.install.outcome == 'success' | |
timeout-minutes: 8 | |
- name: Run tests (dart2js) | |
run: | | |
dart run build_runner test --delete-conflicting-outputs --release -- --preset dart2js | |
if: always() && steps.install.outcome == 'success' | |
timeout-minutes: 8 | |
- uses: anchore/sbom-action@v0 | |
with: | |
path: ./ | |
format: cyclonedx-json |