From b3d1005b5509d8b24bdb8202ed0b7ac91a0168d4 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Thu, 21 Sep 2023 16:09:24 +0800 Subject: [PATCH 1/7] ci: add melos bootstrap action --- .github/workflows/melos_bootstrap.yaml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/melos_bootstrap.yaml diff --git a/.github/workflows/melos_bootstrap.yaml b/.github/workflows/melos_bootstrap.yaml new file mode 100644 index 000000000..409d6bda0 --- /dev/null +++ b/.github/workflows/melos_bootstrap.yaml @@ -0,0 +1,18 @@ +name: "Melos bootstrap" +on: [pull_request] + +permissions: + contents: read + +jobs: + melos-bootstrap: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 + - uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2.10.0 + with: + channel: "stable" + - name: flutter pub get + run: flutter pub get + - name: Do melos bootstrap + run: dart run melos bootstrap From 7ef5f9026d04aaa1a6948912d0f31dd152115de5 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Thu, 21 Sep 2023 16:15:10 +0800 Subject: [PATCH 2/7] chore: fix melos package config --- melos.yaml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/melos.yaml b/melos.yaml index 077266015..bb562f0b3 100644 --- a/melos.yaml +++ b/melos.yaml @@ -1,7 +1,8 @@ name: at_server packages: -- packages/** + - packages/* + - packages/*/example -- tests/** -- tools/build_virtual_environment/install_PKAM_Keys + - tests/* + - tools/build_virtual_environment/install_PKAM_Keys From 8971bcf399c3d8168f2252e13be517f4376d78d5 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Thu, 21 Sep 2023 16:33:26 +0800 Subject: [PATCH 3/7] ci: check with and without pinned dep packages --- .github/workflows/melos_bootstrap.yaml | 8 +++++++- .gitignore | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/melos_bootstrap.yaml b/.github/workflows/melos_bootstrap.yaml index 409d6bda0..2c36f3915 100644 --- a/.github/workflows/melos_bootstrap.yaml +++ b/.github/workflows/melos_bootstrap.yaml @@ -6,6 +6,12 @@ permissions: jobs: melos-bootstrap: + strategy: + fail-fast: false + matrix: + args: + - "" + - '--ignore="at_root_server" --ignore="at_secondary"' runs-on: ubuntu-latest steps: - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 @@ -15,4 +21,4 @@ jobs: - name: flutter pub get run: flutter pub get - name: Do melos bootstrap - run: dart run melos bootstrap + run: dart run melos bootstrap ${{ matrix.args }} diff --git a/.gitignore b/.gitignore index e4b459a1c..0ff8ee24b 100644 --- a/.gitignore +++ b/.gitignore @@ -7,7 +7,7 @@ build/ # If you're building an application, you may want to check-in your pubspec.lock pubspec.lock -pubspec_overrides.yaml # melos +pubspec_overrides.yaml # Directory created by dartdoc # If you don't generate documentation locally you can remove this line. From b0b8e7669a3bf824d69d220648dddc89dfcb5446 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Thu, 21 Sep 2023 16:34:54 +0800 Subject: [PATCH 4/7] ci: dependabot add at_root_server with pub checker --- .github/dependabot.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 167c38996..9298e4a0a 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -17,11 +17,15 @@ updates: - package-ecosystem: "docker" directory: "/tools/build_virtual_environment/ve_base" schedule: - interval: "daily" + interval: "daily" - package-ecosystem: "docker" directory: "/packages/at_root_server" schedule: interval: "daily" + - package-ecosystem: "pub" + directory: "/packages/at_root_server" + schedule: + interval: "daily" - package-ecosystem: "pub" directory: "/packages/at_secondary_server" schedule: @@ -30,4 +34,3 @@ updates: directory: "/tools" # Location of package manifests schedule: interval: "daily" - From fdbc4626aeea7a552b9a687fa23cdedbeadf5950 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 29 Sep 2023 10:06:19 -0400 Subject: [PATCH 5/7] chore: remove ref on at_demo_data dependency in at_functional_test --- tests/at_functional_test/pubspec.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/at_functional_test/pubspec.yaml b/tests/at_functional_test/pubspec.yaml index e0a4919e0..4ea834951 100644 --- a/tests/at_functional_test/pubspec.yaml +++ b/tests/at_functional_test/pubspec.yaml @@ -13,7 +13,6 @@ dependencies: git: url: https://github.com/atsign-foundation/at_demos.git path: at_demo_data - ref: trunk at_chops: ^1.0.1 at_lookup: ^3.0.32 at_commons: ^3.0.55 From 4341ada5ef81234b5bda86a53a0822388a883a50 Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 29 Sep 2023 10:16:30 -0400 Subject: [PATCH 6/7] ci: try a pre-bootstrap hook to pull at_functional_tests's deps --- melos.yaml | 5 +++++ tests/at_functional_test/pubspec.yaml | 1 + 2 files changed, 6 insertions(+) diff --git a/melos.yaml b/melos.yaml index bb562f0b3..ee09121ce 100644 --- a/melos.yaml +++ b/melos.yaml @@ -6,3 +6,8 @@ packages: - tests/* - tools/build_virtual_environment/install_PKAM_Keys + +command: + bootstrap: + hooks: + pre: dart pub get -C tests/at_functional_test diff --git a/tests/at_functional_test/pubspec.yaml b/tests/at_functional_test/pubspec.yaml index 4ea834951..e0a4919e0 100644 --- a/tests/at_functional_test/pubspec.yaml +++ b/tests/at_functional_test/pubspec.yaml @@ -13,6 +13,7 @@ dependencies: git: url: https://github.com/atsign-foundation/at_demos.git path: at_demo_data + ref: trunk at_chops: ^1.0.1 at_lookup: ^3.0.32 at_commons: ^3.0.55 From 975706641654aa01e549049c4e82bd608e8a2d5b Mon Sep 17 00:00:00 2001 From: xavierchanth Date: Fri, 29 Sep 2023 10:23:59 -0400 Subject: [PATCH 7/7] ci: disable full bootstrap check --- .github/workflows/melos_bootstrap.yaml | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/.github/workflows/melos_bootstrap.yaml b/.github/workflows/melos_bootstrap.yaml index 2c36f3915..f793c33b1 100644 --- a/.github/workflows/melos_bootstrap.yaml +++ b/.github/workflows/melos_bootstrap.yaml @@ -1,17 +1,21 @@ name: "Melos bootstrap" -on: [pull_request] +on: + workflow_dispatch: + inputs: + melos_args: + description: "Melos arguments" + required: false + default: '--ignore="at_root_server" --ignore="at_secondary"' + pull_request: permissions: contents: read +env: + default_melos_args: '--ignore="at_root_server" --ignore="at_secondary"' + jobs: melos-bootstrap: - strategy: - fail-fast: false - matrix: - args: - - "" - - '--ignore="at_root_server" --ignore="at_secondary"' runs-on: ubuntu-latest steps: - uses: actions/checkout@3df4ab11eba7bda6032a0b82a6bb43b11571feac # v4.0.0 @@ -21,4 +25,4 @@ jobs: - name: flutter pub get run: flutter pub get - name: Do melos bootstrap - run: dart run melos bootstrap ${{ matrix.args }} + run: dart run melos bootstrap ${{ github.events.inputs.melos_args || env.default_melos_args }}