From eb306fec732d7a436159105db93197ddd75e7aff Mon Sep 17 00:00:00 2001 From: Kevin Moore Date: Tue, 25 May 2021 16:11:39 -0700 Subject: [PATCH] Add weekly cron, update mono_repo generated files --- .github/workflows/dart.yml | 66 ++++++++++++++++++++------------------ mono_repo.yaml | 1 + tool/ci.sh | 19 ++++++++--- 3 files changed, 50 insertions(+), 36 deletions(-) diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 043b3a837..d5a6a30b2 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v3.4.7 +# Created with package:mono_repo v4.0.0 name: Dart CI on: push: @@ -6,6 +6,8 @@ on: - main - master pull_request: + schedule: + - cron: "0 0 * * 0" defaults: run: shell: bash @@ -18,7 +20,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:stable" @@ -29,9 +31,9 @@ jobs: with: sdk: stable - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - name: mono_repo self validate - run: pub global activate mono_repo 3.4.7 + run: pub global activate mono_repo 4.0.0 - name: mono_repo self validate run: pub global run mono_repo generate --validate job_002: @@ -39,7 +41,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:2.9.3;packages:angular_components-angular_gallery-angular_gallery_section;commands:dartanalyzer_0" @@ -52,7 +54,7 @@ jobs: with: sdk: "2.9.3" - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: angular_components_pub_upgrade name: "angular_components; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -88,7 +90,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:angular_gallery-angular_gallery_section;commands:dartfmt-dartanalyzer_1" @@ -101,7 +103,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: angular_gallery_pub_upgrade name: "angular_gallery; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -136,7 +138,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:angular_components;commands:dartfmt-dartanalyzer_0" @@ -149,7 +151,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: angular_components_pub_upgrade name: "angular_components; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -171,7 +173,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:2.9.3;packages:examples/material_chips_example-examples/app_layout_example-examples/material_button_example-examples/material_card_example-examples/material_checkbox_example-examples/material_datepicker_example-examples/material_dialog_example-examples/material_expansionpanel_example-examples/material_icon_example-examples/material_list_example-examples/material_yes_no_buttons_example-examples/material_menu_example;commands:dartanalyzer_0" @@ -184,7 +186,7 @@ jobs: with: sdk: "2.9.3" - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_material_chips_example_pub_upgrade name: "examples/material_chips_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -304,7 +306,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/app_layout_example-examples/material_button_example-examples/material_card_example-examples/material_checkbox_example-examples/material_chips_example-examples/material_datepicker_example-examples/material_dialog_example-examples/material_expansionpanel_example-examples/material_icon_example-examples/material_list_example-examples/material_yes_no_buttons_example;commands:dartfmt-dartanalyzer_1" @@ -317,7 +319,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_app_layout_example_pub_upgrade name: "examples/app_layout_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -472,7 +474,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/material_input_example;commands:dartfmt" @@ -485,7 +487,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_material_input_example_pub_upgrade name: "examples/material_input_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -506,7 +508,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/material_menu_example;commands:dartfmt-dartanalyzer_0" @@ -519,7 +521,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_material_menu_example_pub_upgrade name: "examples/material_menu_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -544,7 +546,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:2.9.3;packages:examples/simple_html_example-examples/material_popup_example-examples/material_progress_example-examples/material_radio_example-examples/material_slider_example-examples/material_spinner_example-examples/material_stepper_example-examples/material_tab_example-examples/material_toggle_example-examples/material_tooltip_example-examples/scorecard_example;commands:dartanalyzer_0" @@ -557,7 +559,7 @@ jobs: with: sdk: "2.9.3" - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_simple_html_example_pub_upgrade name: "examples/simple_html_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -672,7 +674,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/material_popup_example-examples/material_progress_example-examples/material_radio_example-examples/simple_html_example-examples/material_slider_example-examples/material_spinner_example-examples/material_stepper_example-examples/material_tab_example-examples/material_toggle_example-examples/material_tooltip_example-examples/scorecard_example;commands:dartfmt-dartanalyzer_1" @@ -685,7 +687,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_material_popup_example_pub_upgrade name: "examples/material_popup_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -844,7 +846,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/material_tree_example-examples/material_select_example;commands:dartfmt" @@ -857,7 +859,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_material_tree_example_pub_upgrade name: "examples/material_tree_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -891,7 +893,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:angular_components;commands:command_0-test" @@ -904,7 +906,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: angular_components_pub_upgrade name: "angular_components; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -936,7 +938,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:2.9.3;packages:angular_components;commands:command_0-test" @@ -949,7 +951,7 @@ jobs: with: sdk: "2.9.3" - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: angular_components_pub_upgrade name: "angular_components; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -981,7 +983,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:dev;packages:examples/angular_components_example;commands:command_1-command_2" @@ -994,7 +996,7 @@ jobs: with: sdk: dev - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_angular_components_example_pub_upgrade name: "examples/angular_components_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" @@ -1028,7 +1030,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@v2 + uses: actions/cache@v2.1.5 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;dart:stable;packages:examples/angular_components_example;commands:command_1-command_2" @@ -1041,7 +1043,7 @@ jobs: with: sdk: stable - id: checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.3.4 - id: examples_angular_components_example_pub_upgrade name: "examples/angular_components_example; pub upgrade --no-precompile" if: "always() && steps.checkout.conclusion == 'success'" diff --git a/mono_repo.yaml b/mono_repo.yaml index c8f798e0f..d7d47cd5b 100644 --- a/mono_repo.yaml +++ b/mono_repo.yaml @@ -3,6 +3,7 @@ self_validate: analyze_and_format github: + cron: '0 0 * * 0' # “At 00:00 (UTC) on Sunday.” stages: - analyze_and_format_core - analyze_and_format_examples_1 diff --git a/tool/ci.sh b/tool/ci.sh index cb18d3c5f..3c3d4c231 100755 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,12 +1,23 @@ #!/bin/bash -# Created with package:mono_repo v3.4.7 +# Created with package:mono_repo v4.0.0 # Support built in commands on windows out of the box. +# When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") +# then "flutter" is called instead of "pub". +# This assumes that the Flutter SDK has been installed in a previous step. function pub() { - if [[ $TRAVIS_OS_NAME == "windows" ]]; then - command pub.bat "$@" + if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command flutter.bat pub "$@" + else + command flutter pub "$@" + fi else - command pub "$@" + if [[ $TRAVIS_OS_NAME == "windows" ]]; then + command pub.bat "$@" + else + command pub "$@" + fi fi } function dartfmt() {