Skip to content

Commit

Permalink
CI: only do a regular analyze check on non-dev SDKs
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmoo committed Sep 20, 2022
1 parent 63a5782 commit 02ed7aa
Show file tree
Hide file tree
Showing 14 changed files with 74 additions and 70 deletions.
78 changes: 21 additions & 57 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ jobs:
- name: mono_repo self validate
run: dart pub global run mono_repo generate --validate
job_002:
name: "analyze_and_format; Dart 2.17.0; PKGS: _test, _test_package, discoveryapis_commons, discoveryapis_generator, generated/googleapis, generated/googleapis_beta, generator, googleapis_auth, test_integration; `dart format --output=none --set-exit-if-changed .`, `dart analyze --fatal-infos .`"
name: "analyze_and_format; Dart 2.17.0; PKGS: _test, _test_package, discoveryapis_commons, discoveryapis_generator, generated/googleapis, generated/googleapis_beta, generator, googleapis_auth, test_integration; `dart analyze`"
runs-on: ubuntu-latest
steps:
- name: Cache Pub hosted dependencies
uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration;commands:analyze_1"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration
os:ubuntu-latest;pub-cache-hosted;sdk:2.17.0
Expand All @@ -65,116 +65,80 @@ jobs:
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: _test
- name: "_test; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps._test_pub_upgrade.conclusion == 'success'"
working-directory: _test
- name: "_test; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: _test; dart analyze
run: dart analyze
if: "always() && steps._test_pub_upgrade.conclusion == 'success'"
working-directory: _test
- id: _test_package_pub_upgrade
name: _test_package; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: _test_package
- name: "_test_package; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps._test_package_pub_upgrade.conclusion == 'success'"
working-directory: _test_package
- name: "_test_package; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: _test_package; dart analyze
run: dart analyze
if: "always() && steps._test_package_pub_upgrade.conclusion == 'success'"
working-directory: _test_package
- id: discoveryapis_commons_pub_upgrade
name: discoveryapis_commons; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: discoveryapis_commons
- name: "discoveryapis_commons; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.discoveryapis_commons_pub_upgrade.conclusion == 'success'"
working-directory: discoveryapis_commons
- name: "discoveryapis_commons; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: discoveryapis_commons; dart analyze
run: dart analyze
if: "always() && steps.discoveryapis_commons_pub_upgrade.conclusion == 'success'"
working-directory: discoveryapis_commons
- id: discoveryapis_generator_pub_upgrade
name: discoveryapis_generator; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: discoveryapis_generator
- name: "discoveryapis_generator; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.discoveryapis_generator_pub_upgrade.conclusion == 'success'"
working-directory: discoveryapis_generator
- name: "discoveryapis_generator; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: discoveryapis_generator; dart analyze
run: dart analyze
if: "always() && steps.discoveryapis_generator_pub_upgrade.conclusion == 'success'"
working-directory: discoveryapis_generator
- id: generated_googleapis_pub_upgrade
name: generated/googleapis; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: generated/googleapis
- name: "generated/googleapis; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.generated_googleapis_pub_upgrade.conclusion == 'success'"
working-directory: generated/googleapis
- name: "generated/googleapis; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: generated/googleapis; dart analyze
run: dart analyze
if: "always() && steps.generated_googleapis_pub_upgrade.conclusion == 'success'"
working-directory: generated/googleapis
- id: generated_googleapis_beta_pub_upgrade
name: generated/googleapis_beta; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: generated/googleapis_beta
- name: "generated/googleapis_beta; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.generated_googleapis_beta_pub_upgrade.conclusion == 'success'"
working-directory: generated/googleapis_beta
- name: "generated/googleapis_beta; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: generated/googleapis_beta; dart analyze
run: dart analyze
if: "always() && steps.generated_googleapis_beta_pub_upgrade.conclusion == 'success'"
working-directory: generated/googleapis_beta
- id: generator_pub_upgrade
name: generator; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: generator
- name: "generator; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.generator_pub_upgrade.conclusion == 'success'"
working-directory: generator
- name: "generator; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: generator; dart analyze
run: dart analyze
if: "always() && steps.generator_pub_upgrade.conclusion == 'success'"
working-directory: generator
- id: googleapis_auth_pub_upgrade
name: googleapis_auth; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: googleapis_auth
- name: "googleapis_auth; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.googleapis_auth_pub_upgrade.conclusion == 'success'"
working-directory: googleapis_auth
- name: "googleapis_auth; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: googleapis_auth; dart analyze
run: dart analyze
if: "always() && steps.googleapis_auth_pub_upgrade.conclusion == 'success'"
working-directory: googleapis_auth
- id: test_integration_pub_upgrade
name: test_integration; dart pub upgrade
run: dart pub upgrade
if: "always() && steps.checkout.conclusion == 'success'"
working-directory: test_integration
- name: "test_integration; dart format --output=none --set-exit-if-changed ."
run: "dart format --output=none --set-exit-if-changed ."
if: "always() && steps.test_integration_pub_upgrade.conclusion == 'success'"
working-directory: test_integration
- name: "test_integration; dart analyze --fatal-infos ."
run: dart analyze --fatal-infos .
- name: test_integration; dart analyze
run: dart analyze
if: "always() && steps.test_integration_pub_upgrade.conclusion == 'success'"
working-directory: test_integration
job_003:
Expand All @@ -185,7 +149,7 @@ jobs:
uses: actions/cache@fd5de65bc895cf536527842281bea11763fefd77
with:
path: "~/.pub-cache/hosted"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration;commands:format-analyze"
key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration;commands:format-analyze_0"
restore-keys: |
os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:_test-_test_package-discoveryapis_commons-discoveryapis_generator-generated/googleapis-generated/googleapis_beta-generator-googleapis_auth-test_integration
os:ubuntu-latest;pub-cache-hosted;sdk:dev
Expand Down
8 changes: 4 additions & 4 deletions _test/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
sdk:
- pubspec
- dev

stages:
- analyze_and_format:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
4 changes: 4 additions & 0 deletions _test_package/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions discoveryapis_commons/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions discoveryapis_generator/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions generated/googleapis/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions generated/googleapis_beta/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
8 changes: 4 additions & 4 deletions generator/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# See https://pub.dev/packages/mono_repo
sdk:
- pubspec
- dev

stages:
- analyze_and_format:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
4 changes: 4 additions & 0 deletions googleapis_auth/mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test: -p vm
- test: -p chrome
4 changes: 4 additions & 0 deletions resources/googleapis/_mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions resources/googleapis_beta/_mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
4 changes: 4 additions & 0 deletions resources/test_pkg_mono_pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,9 @@ stages:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
- unittest:
- test:
8 changes: 4 additions & 4 deletions test_integration/mono_pkg.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
# See https://pub.dev/packages/mono_repo
sdk:
- pubspec
- dev

stages:
- analyze_and_format:
- group:
- format
- analyze: --fatal-infos .
sdk: dev
- group:
- analyze
sdk: pubspec
# Need to wire up Google auth on CI before we can test this on...CI
#- unittest:
# - test:
6 changes: 5 additions & 1 deletion tool/ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,14 @@ for PKG in ${PKGS}; do
echo
echo -e "\033[1mPKG: ${PKG}; TASK: ${TASK}\033[22m"
case ${TASK} in
analyze)
analyze_0)
echo 'dart analyze --fatal-infos .'
dart analyze --fatal-infos . || EXIT_CODE=$?
;;
analyze_1)
echo 'dart analyze'
dart analyze || EXIT_CODE=$?
;;
format)
echo 'dart format --output=none --set-exit-if-changed .'
dart format --output=none --set-exit-if-changed . || EXIT_CODE=$?
Expand Down

0 comments on commit 02ed7aa

Please sign in to comment.