diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index f861ae144..4da4c0b67 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v3.3.0 +# Created with package:mono_repo v3.4.1 name: Dart CI on: push: @@ -30,13 +30,14 @@ jobs: - uses: cedx/setup-dart@v2 with: release-channel: stable - version: latest - run: dart --version - uses: actions/checkout@v2 - - run: pub global activate mono_repo 3.3.0 - - run: pub global run mono_repo generate --validate + - name: mono_repo self validate + run: pub global activate mono_repo 3.4.1 + - name: mono_repo self validate + run: pub global run mono_repo generate --validate job_002: - name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: [`dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings --fatal-infos .`]" + name: "analyzer_and_format; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dartfmt -n --set-exit-if-changed .`, `dartanalyzer --fatal-warnings --fatal-infos .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -54,12 +55,68 @@ jobs: release-channel: dev - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_annotation json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh dartfmt dartanalyzer_0 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; dartfmt -n --set-exit-if-changed ." + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: dartfmt -n --set-exit-if-changed . + - name: "_test_yaml; dartanalyzer --fatal-warnings --fatal-infos ." + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: dartanalyzer --fatal-warnings --fatal-infos . + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; dartfmt -n --set-exit-if-changed ." + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: dartfmt -n --set-exit-if-changed . + - name: "checked_yaml; dartanalyzer --fatal-warnings --fatal-infos ." + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: dartanalyzer --fatal-warnings --fatal-infos . + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; dartfmt -n --set-exit-if-changed ." + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dartfmt -n --set-exit-if-changed . + - name: "example; dartanalyzer --fatal-warnings --fatal-infos ." + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dartanalyzer --fatal-warnings --fatal-infos . + - id: json_annotation_pub_upgrade + name: "json_annotation; pub upgrade --no-precompile" + working-directory: json_annotation + run: pub upgrade --no-precompile + - name: "json_annotation; dartfmt -n --set-exit-if-changed ." + if: "steps.json_annotation_pub_upgrade.conclusion == 'success'" + working-directory: json_annotation + run: dartfmt -n --set-exit-if-changed . + - name: "json_annotation; dartanalyzer --fatal-warnings --fatal-infos ." + if: "steps.json_annotation_pub_upgrade.conclusion == 'success'" + working-directory: json_annotation + run: dartanalyzer --fatal-warnings --fatal-infos . + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; dartfmt -n --set-exit-if-changed ." + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: dartfmt -n --set-exit-if-changed . + - name: "json_serializable; dartanalyzer --fatal-warnings --fatal-infos ." + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: dartanalyzer --fatal-warnings --fatal-infos . job_003: - name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; TASKS: `dartanalyzer --fatal-warnings .`" + name: "analyzer_and_format; Dart 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_annotation, json_serializable; `dartanalyzer --fatal-warnings .`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -78,12 +135,48 @@ jobs: version: "2.7.0" - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_annotation json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh dartanalyzer_1 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; dartanalyzer --fatal-warnings ." + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: dartanalyzer --fatal-warnings . + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; dartanalyzer --fatal-warnings ." + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: dartanalyzer --fatal-warnings . + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; dartanalyzer --fatal-warnings ." + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: dartanalyzer --fatal-warnings . + - id: json_annotation_pub_upgrade + name: "json_annotation; pub upgrade --no-precompile" + working-directory: json_annotation + run: pub upgrade --no-precompile + - name: "json_annotation; dartanalyzer --fatal-warnings ." + if: "steps.json_annotation_pub_upgrade.conclusion == 'success'" + working-directory: json_annotation + run: dartanalyzer --fatal-warnings . + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; dartanalyzer --fatal-warnings ." + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: dartanalyzer --fatal-warnings . job_004: - name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`" + name: "unit_test; Dart 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -102,16 +195,44 @@ jobs: version: "2.7.0" - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_0 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: _test_yaml; pub run test + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: checked_yaml; pub run test + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: example; pub run test + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: json_serializable; pub run test + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test needs: - job_001 - job_002 - job_003 job_005: - name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test`" + name: "unit_test; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -129,16 +250,44 @@ jobs: release-channel: dev - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_0 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: _test_yaml; pub run test + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: checked_yaml; pub run test + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: example; pub run test + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: json_serializable; pub run test + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test needs: - job_001 - job_002 - job_003 - job_008: - name: "OS: linux; SDK: 2.7.0; PKG: json_serializable; TASKS: `pub run test -p chrome`" + job_006: + name: "unit_test; Dart 2.7.0; PKG: json_serializable; `pub run test -p chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -157,16 +306,20 @@ jobs: version: "2.7.0" - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_2 + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test -p chrome" + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test -p chrome needs: - job_001 - job_002 - job_003 - job_009: - name: "OS: linux; SDK: dev; PKG: json_serializable; TASKS: `pub run test -p chrome`" + job_007: + name: "unit_test; Dart dev; PKG: json_serializable; `pub run test -p chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -184,16 +337,20 @@ jobs: release-channel: dev - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_2 + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test -p chrome" + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test -p chrome needs: - job_001 - job_002 - job_003 - job_006: - name: "OS: linux; SDK: 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + job_008: + name: "ensure_build; Dart 2.7.0; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -212,17 +369,45 @@ jobs: version: "2.7.0" - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_1 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart needs: - job_004 - job_005 - - job_008 - - job_009 - job_007: - name: "OS: linux; SDK: dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; TASKS: `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" + - job_006 + - job_007 + job_009: + name: "ensure_build; Dart dev; PKGS: _test_yaml, checked_yaml, example, json_serializable; `pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies @@ -240,12 +425,40 @@ jobs: release-channel: dev - run: dart --version - uses: actions/checkout@v2 - - env: - PKGS: _test_yaml checked_yaml example json_serializable - TRAVIS_OS_NAME: linux - run: tool/ci.sh test_1 + - id: _test_yaml_pub_upgrade + name: "_test_yaml; pub upgrade --no-precompile" + working-directory: _test_yaml + run: pub upgrade --no-precompile + - name: "_test_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps._test_yaml_pub_upgrade.conclusion == 'success'" + working-directory: _test_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: checked_yaml_pub_upgrade + name: "checked_yaml; pub upgrade --no-precompile" + working-directory: checked_yaml + run: pub upgrade --no-precompile + - name: "checked_yaml; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.checked_yaml_pub_upgrade.conclusion == 'success'" + working-directory: checked_yaml + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: example_pub_upgrade + name: "example; pub upgrade --no-precompile" + working-directory: example + run: pub upgrade --no-precompile + - name: "example; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.example_pub_upgrade.conclusion == 'success'" + working-directory: example + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart + - id: json_serializable_pub_upgrade + name: "json_serializable; pub upgrade --no-precompile" + working-directory: json_serializable + run: pub upgrade --no-precompile + - name: "json_serializable; pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart" + if: "steps.json_serializable_pub_upgrade.conclusion == 'success'" + working-directory: json_serializable + run: pub run test --run-skipped -t presubmit-only test/ensure_build_test.dart needs: - job_004 - job_005 - - job_008 - - job_009 + - job_006 + - job_007 diff --git a/checked_yaml/test/readme_test.dart b/checked_yaml/test/readme_test.dart index 2e05f8283..f2727832c 100644 --- a/checked_yaml/test/readme_test.dart +++ b/checked_yaml/test/readme_test.dart @@ -11,7 +11,7 @@ import 'package:test_process/test_process.dart'; final _examplePath = p.join('example', 'example.dart'); -final _readmeContent = File('readme.md').readAsStringSync(); +final _readmeContent = File('README.md').readAsStringSync(); final _exampleContent = File(_examplePath).readAsStringSync(); const _memberEnd = '\n}'; diff --git a/tool/ci.sh b/tool/ci.sh index 7e4a12bbe..5f425832c 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Created with package:mono_repo v3.3.0 +# Created with package:mono_repo v3.4.1 # Support built in commands on windows out of the box. function pub() {