diff --git a/.github/labeler.yml b/.github/labeler.yml index e6b1ace3..c5e15a37 100644 --- a/.github/labeler.yml +++ b/.github/labeler.yml @@ -1,28 +1,37 @@ # Configuration for .github/workflows/pull_request_label.yml. 'infra': - - '.github/**' + - changed-files: + - any-glob-to-any-file: '.github/**' 'package:shelf': - - 'pkgs/shelf/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf/**' 'package:shelf_packages_handler': - - 'pkgs/shelf_packages_handler/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_packages_handler/**' 'package:shelf_proxy': - - 'pkgs/shelf_proxy/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_proxy/**' 'package:shelf_router': - - 'pkgs/shelf_router/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_router/**' 'package:shelf_router_generator': - - 'pkgs/shelf_router_generator/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_router_generator/**' 'package:shelf_static': - - 'pkgs/shelf_static/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_static/**' 'package:shelf_test_handler': - - 'pkgs/shelf_test_handler/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_test_handler/**' 'package:shelf_web_socket': - - 'pkgs/shelf_web_socket/**' + - changed-files: + - any-glob-to-any-file: 'pkgs/shelf_web_socket/**' diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 9e35a01e..1a98453a 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -1,4 +1,4 @@ -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.6.1 name: Dart CI on: push: @@ -21,7 +21,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:stable" @@ -29,14 +29,14 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: stable - id: checkout name: Checkout repository uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 - name: mono_repo self validate - run: dart pub global activate mono_repo 6.5.7 + run: dart pub global activate mono_repo 6.6.1 - name: mono_repo self validate run: dart pub global run mono_repo generate --validate job_002: @@ -44,7 +44,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze" @@ -54,7 +54,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -137,7 +137,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:analyze" @@ -147,7 +147,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -230,7 +230,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:format" @@ -240,7 +240,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -323,7 +323,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1" @@ -333,7 +333,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -367,7 +367,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:3.0.0;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0" @@ -377,7 +377,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -461,11 +461,55 @@ jobs: - job_003 - job_004 job_007: + name: "unit_test; linux; Dart dev; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm`" + runs-on: ubuntu-latest + steps: + - name: Cache Pub hosted dependencies + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 + with: + path: "~/.pub-cache/hosted" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_2" + restore-keys: | + os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_test_handler + os:ubuntu-latest;pub-cache-hosted;sdk:dev + os:ubuntu-latest;pub-cache-hosted + os:ubuntu-latest + - name: Setup Dart SDK + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 + with: + sdk: dev + - id: checkout + name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + - id: pkgs_shelf_pub_upgrade + name: pkgs/shelf; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/shelf + - name: "pkgs/shelf; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + if: "always() && steps.pkgs_shelf_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/shelf + - id: pkgs_shelf_test_handler_pub_upgrade + name: pkgs/shelf_test_handler; dart pub upgrade + run: dart pub upgrade + if: "always() && steps.checkout.conclusion == 'success'" + working-directory: pkgs/shelf_test_handler + - name: "pkgs/shelf_test_handler; dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + run: "dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm" + if: "always() && steps.pkgs_shelf_test_handler_pub_upgrade.conclusion == 'success'" + working-directory: pkgs/shelf_test_handler + needs: + - job_001 + - job_002 + - job_003 + - job_004 + job_008: name: "unit_test; linux; Dart dev; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_test_handler;commands:test_1" @@ -475,7 +519,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -504,12 +548,12 @@ jobs: - job_002 - job_003 - job_004 - job_008: + job_009: name: "unit_test; linux; Dart dev; PKGS: pkgs/shelf, pkgs/shelf_packages_handler, pkgs/shelf_proxy, pkgs/shelf_router, pkgs/shelf_router_generator, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf-pkgs/shelf_packages_handler-pkgs/shelf_proxy-pkgs/shelf_router-pkgs/shelf_router_generator-pkgs/shelf_static-pkgs/shelf_test_handler-pkgs/shelf_web_socket;commands:test_0" @@ -519,7 +563,7 @@ jobs: os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -602,22 +646,22 @@ jobs: - job_002 - job_003 - job_004 - job_009: + job_010: name: "unit_test; linux; Dart dev; PKG: pkgs/shelf_router_generator; `dart test --run-skipped -t presubmit-only`" runs-on: ubuntu-latest steps: - name: Cache Pub hosted dependencies - uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 + uses: actions/cache@ab5e6d0c87105b4c9c2047343972218f562e4319 with: path: "~/.pub-cache/hosted" - key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf_router_generator;commands:test_2" + key: "os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf_router_generator;commands:test_3" restore-keys: | os:ubuntu-latest;pub-cache-hosted;sdk:dev;packages:pkgs/shelf_router_generator os:ubuntu-latest;pub-cache-hosted;sdk:dev os:ubuntu-latest;pub-cache-hosted os:ubuntu-latest - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -637,12 +681,12 @@ jobs: - job_002 - job_003 - job_004 - job_010: + job_011: name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`" runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -671,12 +715,12 @@ jobs: - job_002 - job_003 - job_004 - job_011: + job_012: name: "unit_test; windows; Dart 3.0.0; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`" runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: "3.0.0" - id: checkout @@ -723,12 +767,12 @@ jobs: - job_002 - job_003 - job_004 - job_012: + job_013: name: "unit_test; windows; Dart dev; PKGS: pkgs/shelf, pkgs/shelf_test_handler; `dart test --test-randomize-ordering-seed=random -p chrome`" runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout @@ -757,12 +801,12 @@ jobs: - job_002 - job_003 - job_004 - job_013: + job_014: name: "unit_test; windows; Dart dev; PKGS: pkgs/shelf_packages_handler, pkgs/shelf_static, pkgs/shelf_test_handler, pkgs/shelf_web_socket; `dart test --test-randomize-ordering-seed=random`" runs-on: windows-latest steps: - name: Setup Dart SDK - uses: dart-lang/setup-dart@b64355ae6ca0b5d484f0106a033dd1388965d06d + uses: dart-lang/setup-dart@fedb1266e91cf51be2fdb382869461a434b920a3 with: sdk: dev - id: checkout diff --git a/.github/workflows/no-response.yml b/.github/workflows/no-response.yml index dd7bbbc0..1a6f2ecd 100644 --- a/.github/workflows/no-response.yml +++ b/.github/workflows/no-response.yml @@ -19,7 +19,7 @@ jobs: runs-on: ubuntu-latest if: ${{ github.repository_owner == 'dart-lang' }} steps: - - uses: actions/stale@1160a2240286f5da8ec72b1c0816ce2481aabf84 + - uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e with: days-before-stale: -1 days-before-close: 14 diff --git a/.github/workflows/pull_request_label.yml b/.github/workflows/pull_request_label.yml index 9933aad4..54e3df53 100644 --- a/.github/workflows/pull_request_label.yml +++ b/.github/workflows/pull_request_label.yml @@ -16,7 +16,7 @@ jobs: pull-requests: write runs-on: ubuntu-latest steps: - - uses: actions/labeler@ac9175f8a1f3625fd0d4fb234536d26811351594 + - uses: actions/labeler@8558fd74291d67161a8a78ce36a881fa63b766a9 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" sync-labels: true diff --git a/pkgs/shelf/CHANGELOG.md b/pkgs/shelf/CHANGELOG.md index fb569db7..e8ef847e 100644 --- a/pkgs/shelf/CHANGELOG.md +++ b/pkgs/shelf/CHANGELOG.md @@ -1,4 +1,4 @@ -## 1.4.2-dev +## 1.4.2-wip * Require Dart ^3.0.0 diff --git a/pkgs/shelf/mono_pkg.yaml b/pkgs/shelf/mono_pkg.yaml index 9f798af9..9ae1f104 100644 --- a/pkgs/shelf/mono_pkg.yaml +++ b/pkgs/shelf/mono_pkg.yaml @@ -17,3 +17,5 @@ stages: os: - linux - windows + - test: --test-randomize-ordering-seed=random -p chrome -c dart2wasm + sdk: dev diff --git a/pkgs/shelf/pubspec.yaml b/pkgs/shelf/pubspec.yaml index fd4722fb..72be310f 100644 --- a/pkgs/shelf/pubspec.yaml +++ b/pkgs/shelf/pubspec.yaml @@ -1,5 +1,5 @@ name: shelf -version: 1.4.2-dev +version: 1.4.2-wip description: > A model for web server middleware that encourages composition and easy reuse. repository: https://github.com/dart-lang/shelf/tree/master/pkgs/shelf diff --git a/pkgs/shelf_test_handler/mono_pkg.yaml b/pkgs/shelf_test_handler/mono_pkg.yaml index d659add4..0a5c7d1b 100644 --- a/pkgs/shelf_test_handler/mono_pkg.yaml +++ b/pkgs/shelf_test_handler/mono_pkg.yaml @@ -17,3 +17,5 @@ stages: os: - linux - windows + - test: --test-randomize-ordering-seed=random -p chrome -c dart2wasm + sdk: dev diff --git a/tool/ci.sh b/tool/ci.sh index 814bbaf3..c7b4cd76 100644 --- a/tool/ci.sh +++ b/tool/ci.sh @@ -1,9 +1,10 @@ #!/bin/bash -# Created with package:mono_repo v6.5.7 +# Created with package:mono_repo v6.6.1 # 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". +# then "flutter pub" is called instead of "dart pub". # This assumes that the Flutter SDK has been installed in a previous step. function pub() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -12,18 +13,13 @@ function pub() { command dart pub "$@" fi } -# 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 format() { - if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then - command flutter format "$@" - else - command dart format "$@" - fi + command dart format "$@" } + # When it is a flutter repo (check the pubspec.yaml for "sdk: flutter") -# then "flutter" is called instead of "pub". +# then "flutter analyze" is called instead of "dart analyze". # This assumes that the Flutter SDK has been installed in a previous step. function analyze() { if grep -Fq "sdk: flutter" "${PWD}/pubspec.yaml"; then @@ -84,6 +80,10 @@ for PKG in ${PKGS}; do dart test --test-randomize-ordering-seed=random -p chrome || EXIT_CODE=$? ;; test_2) + echo 'dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm' + dart test --test-randomize-ordering-seed=random -p chrome -c dart2wasm || EXIT_CODE=$? + ;; + test_3) echo 'dart test --run-skipped -t presubmit-only' dart test --run-skipped -t presubmit-only || EXIT_CODE=$? ;;