From 5261242a4f89062f488e1a5777027f87f442ebd1 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Fri, 4 Jun 2021 13:22:13 -0400 Subject: [PATCH 01/22] [Tests] Fix intro tests on older macOS (#11736) Co-authored-by: Rolf Bjarne Kvinge --- tests/introspection/Mac/MacApiCtorInitTest.cs | 9 ++++++++- tests/introspection/Mac/MacApiProtocolTest.cs | 7 +++++++ tests/introspection/Mac/MacApiSelectorTest.cs | 10 ++++++++++ 3 files changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/introspection/Mac/MacApiCtorInitTest.cs b/tests/introspection/Mac/MacApiCtorInitTest.cs index 796b3594035c..35b113a23744 100644 --- a/tests/introspection/Mac/MacApiCtorInitTest.cs +++ b/tests/introspection/Mac/MacApiCtorInitTest.cs @@ -200,7 +200,14 @@ the permission system (TCC) fails and the process ends up crashing return TestRuntime.CheckXcodeVersion (11, 2); case "GameKit.GKGameCenterViewController": // the native 'init' method returned nil. return TestRuntime.CheckXcodeVersion (11, 2); - + case "MetalPerformanceShaders.MPSPredicate": + // Fails on Catalina: Could not initialize an instance of the type + // 'MetalPerformanceShaders.MPSPredicate': the native 'init' method returned nil. + if (Mac.CheckSystemVersion (10, 14)) + break; + if (Mac.CheckSystemVersion (10, 15)) + return true; + break; } switch (type.Namespace) { diff --git a/tests/introspection/Mac/MacApiProtocolTest.cs b/tests/introspection/Mac/MacApiProtocolTest.cs index 5e30ec36d153..8d8b833cb7ef 100644 --- a/tests/introspection/Mac/MacApiProtocolTest.cs +++ b/tests/introspection/Mac/MacApiProtocolTest.cs @@ -34,7 +34,14 @@ protected override bool Skip (Type type) return true; case "AVCaptureSynchronizedDataCollection": case "AVCaptureSynchronizedData": + case "MPSImageLaplacianPyramid": + case "MPSImageLaplacianPyramidSubtract": + case "MPSImageLaplacianPyramidAdd": + case "MPSCnnYoloLossNode": + case "CXProvider": return TestRuntime.IsVM; // skip only on vms + case "NSMenuView": // not longer supported + return true; default: return base.Skip (type); } diff --git a/tests/introspection/Mac/MacApiSelectorTest.cs b/tests/introspection/Mac/MacApiSelectorTest.cs index 9eb512f4e1f0..a3638b250ae7 100644 --- a/tests/introspection/Mac/MacApiSelectorTest.cs +++ b/tests/introspection/Mac/MacApiSelectorTest.cs @@ -138,6 +138,16 @@ protected override bool Skip (Type type, string selectorName) if (!Mac.CheckSystemVersion (10, 12)) // NSCoding was added in 10.12 return true; break; + case "MLDictionaryFeatureProvider": + case "MLMultiArray": + case "MLFeatureValue": + case "MLSequence": + // Fail on Catalina, pass in older OS + if (Mac.CheckSystemVersion (10, 14)) + break; + if (Mac.CheckSystemVersion (10, 15)) + return true; + break; } break; case "accessibilityNotifiesWhenDestroyed": From 7d514fb10755ffa3308afaf420e12ae5fa42558e Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 12:22:24 -0500 Subject: [PATCH 02/22] Seeing if pushing to this lego branch will create a PR inside AutomatingLocalizationGHATest --- tests/mtouch/LocalizationTests.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/mtouch/LocalizationTests.cs b/tests/mtouch/LocalizationTests.cs index 84b1fee3b001..022f05c8bc10 100644 --- a/tests/mtouch/LocalizationTests.cs +++ b/tests/mtouch/LocalizationTests.cs @@ -13,6 +13,8 @@ namespace Xamarin.Tests { + // THIS IS A TEST TO SEE IF THIS TEXT APPEARS + // INSIDE AutomatingLocalizationGHATest2 [TestFixture] public class LocalizationTests { From 671f12de65104692fb339656c5e7460063fc02f8 Mon Sep 17 00:00:00 2001 From: Manuel de la Pena Date: Fri, 4 Jun 2021 13:22:54 -0400 Subject: [PATCH 03/22] [Actions] Remove broken action. (#11819) Actions that are triggered from forks do not have access to the secrets making the action fail most of the time. We have moved to a github action in the static page repo that will clean results of closed PRs everyday. We remove this action because is broken and not needed. --- .github/workflows/github-page-clean-up.yml | 65 ---------------------- 1 file changed, 65 deletions(-) delete mode 100644 .github/workflows/github-page-clean-up.yml diff --git a/.github/workflows/github-page-clean-up.yml b/.github/workflows/github-page-clean-up.yml deleted file mode 100644 index cdccc147f8d0..000000000000 --- a/.github/workflows/github-page-clean-up.yml +++ /dev/null @@ -1,65 +0,0 @@ -name: Clean PR macios.ci data - -on: - workflow_dispatch: - inputs: - pr_number: - description: 'PR number to clean' - required: true - - pull_request: - types: [closed] - -# lock to ensure we do not step on each other -concurrency: - group: 'macios.ci-cleanup' - cancel-in-progress: false - -jobs: - clean-up: - runs-on: ubuntu-latest - name: Clean PR data - steps: - - - uses: actions/checkout@v2 - name: 'Checkout xamarin-macios' - with: - path: xamarin-macios - - - uses: actions/checkout@v2 - name: 'Checkout macios.ci' - with: - repository: 'xamarin/macios.ci' - token: $ - path: macios.ci - lfs: true - ref: main - - - run: echo "$GITHUB_CONTEXT" - name: 'Debug context' - env: - GITHUB_CONTEXT: ${{ toJson(github) }} - - - run: | - ls -R $WORKSPACE - name: 'Debug checkouts' - env: - WORKSPACE: ${{ github.workspace }} - - - - run: | - PR_DATA="pr/PR$PR_NUMBER" - cd $MACIOS_CI_PATH - ls "$MACIOS_CI_PATH/pr" - if [[ -d "$PR_DATA" ]]; then - git checkout -b "pr/clean/PR$PR_NUMBER" - git rm -r $PR_DATA - git commit -m"[Action] Remove data of PR $PR_NUMBER" -a - git push origin "pr/clean/PR$PR_NUMBER" -f - else - echo "PR$PR_NUMBER has no data in the static page." - fi - name: 'Remove data' - env: - MACIOS_CI_PATH: ${{ github.workspace }}/macios.ci - PR_NUMBER: ${{ github.event.number }} From f70a589c60e758e81879df3877d69f641c06b8a0 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 12:35:03 -0500 Subject: [PATCH 04/22] try again --- tests/mtouch/LocalizationTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/mtouch/LocalizationTests.cs b/tests/mtouch/LocalizationTests.cs index 022f05c8bc10..a01b325fc5c8 100644 --- a/tests/mtouch/LocalizationTests.cs +++ b/tests/mtouch/LocalizationTests.cs @@ -15,6 +15,7 @@ namespace Xamarin.Tests { // THIS IS A TEST TO SEE IF THIS TEXT APPEARS // INSIDE AutomatingLocalizationGHATest2 + // try again [TestFixture] public class LocalizationTests { From 0eaec295817efa518dbf53c4732d55f3969c82d5 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 12:54:24 -0500 Subject: [PATCH 05/22] let's get the lego firing again --- .../Xamarin.MacDev.Tasks.Tests/TaskTests/BTouchTaskTest.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/BTouchTaskTest.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/BTouchTaskTest.cs index 93f6ccbe8b25..db86a3d223ec 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/BTouchTaskTest.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/BTouchTaskTest.cs @@ -7,6 +7,7 @@ namespace Xamarin.iOS.Tasks { + // adding this comment as a test class CustomBTouchTask : BTouch { public string GetCommandLineCommands () From 383e164e5ee185c006943ba47192e328919f13f3 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 13:05:07 -0500 Subject: [PATCH 06/22] fire lego #3 --- .../TaskTests/CollectITunesArtworkTaskTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CollectITunesArtworkTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CollectITunesArtworkTaskTests.cs index f82c57dee868..6723752c435b 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CollectITunesArtworkTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/CollectITunesArtworkTaskTests.cs @@ -6,6 +6,7 @@ using NUnit.Framework; namespace Xamarin.iOS.Tasks { + // lets fire the lego one #3 [TestFixture] public class CollectITunesArtworkTaskTests : TestBase { string AppPath => Path.GetDirectoryName (GetType ().Assembly.Location); From f0ed39af21a9f49e11a9ed293c5c494ca6eda8a6 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 13:29:17 -0500 Subject: [PATCH 07/22] see if test gha occurs --- .../Xamarin.MacDev.Tasks.Tests.sln | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.sln diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.sln b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.sln new file mode 100644 index 000000000000..09a786bac634 --- /dev/null +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/Xamarin.MacDev.Tasks.Tests.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.809.10 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Xamarin.MacDev.Tasks.Tests", "Xamarin.MacDev.Tasks.Tests.csproj", "{2E89BF4C-7350-4422-B77B-C7D24C1FF679}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {2E89BF4C-7350-4422-B77B-C7D24C1FF679}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {2E89BF4C-7350-4422-B77B-C7D24C1FF679}.Debug|Any CPU.Build.0 = Debug|Any CPU + {2E89BF4C-7350-4422-B77B-C7D24C1FF679}.Release|Any CPU.ActiveCfg = Release|Any CPU + {2E89BF4C-7350-4422-B77B-C7D24C1FF679}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {57944AA3-4A6C-4D43-8C84-DE4BBAA1E9DE} + EndGlobalSection +EndGlobal From 6e5bda36a77a6e01e2d86d4aee22d9ebdae20e57 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 13:34:14 -0500 Subject: [PATCH 08/22] trying after changing gha name --- .../TaskTests/DetectSdkLocationsTaskTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/DetectSdkLocationsTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/DetectSdkLocationsTaskTests.cs index 4326a811ed1a..7650ff5eb6ab 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/DetectSdkLocationsTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/DetectSdkLocationsTaskTests.cs @@ -5,6 +5,7 @@ namespace Xamarin.iOS.Tasks { + // Trying with the changed name [TestFixture] public class DetectSdkLocationsTaskTests : TestBase { From 1a8f249b8c9ea1469da2838158ace3ba5db237e0 Mon Sep 17 00:00:00 2001 From: TJ Lambert <50846373+tj-devel709@users.noreply.github.com> Date: Fri, 4 Jun 2021 14:39:03 -0500 Subject: [PATCH 09/22] changing the branch (#11826) Co-authored-by: tj_devel709 --- .github/workflows/localization-update.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/localization-update.yml b/.github/workflows/localization-update.yml index 8d331345b27f..288e42776eb2 100644 --- a/.github/workflows/localization-update.yml +++ b/.github/workflows/localization-update.yml @@ -15,8 +15,8 @@ jobs: - uses: repo-sync/pull-request@v2 name: pull-request with: - destination_branch: "main" - pr_title: "[Localization] Pulling New Localization Translations" + destination_branch: "AutomatingLocalizationGHATest" + pr_title: "[Localization] Pulling New Localization Translations $GITHUB_RUN_ID" pr_body: "Automated PR. Bring new translated changes in the lcl files for OneLocBuild to create translated resx files." pr_label: "not-notes-worthy" pr_milestone: "Future" From 7ab326ed04158f031acfe87987822a7691e5eb27 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 14:40:36 -0500 Subject: [PATCH 10/22] after changing the GHA in main --- .../TaskTests/GetBundleNameTaskTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/GetBundleNameTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/GetBundleNameTaskTests.cs index 08962d0574ea..6e7d2d39f2ee 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/GetBundleNameTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/GetBundleNameTaskTests.cs @@ -6,6 +6,7 @@ namespace Xamarin.iOS.Tasks { + // after changing the GHA in main [TestFixture] public class GetBundleNameTaskTests : TestBase { From 270678e0befac3069ec59589e1de05cf661ad4e0 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 14:55:32 -0500 Subject: [PATCH 11/22] perhaps the action was not updated yet --- .../Xamarin.MacDev.Tasks.Tests/TaskTests/IBToolTaskTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/IBToolTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/IBToolTaskTests.cs index 4502baa8164c..b2e1dde351f8 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/IBToolTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/IBToolTaskTests.cs @@ -14,6 +14,7 @@ namespace Xamarin.iOS.Tasks { + // seems maybe the action was not fully updated? [TestFixture] public class IBToolTaskTests : TestBase { From 9c67d6aeb5cf46682f60b278bf8e45aeaf799b3c Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 14:58:01 -0500 Subject: [PATCH 12/22] after merge main --- .../Xamarin.MacDev.Tasks.Tests/TaskTests/MTouchTaskTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MTouchTaskTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MTouchTaskTests.cs index c5fe7dda0a9d..d059a827f821 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MTouchTaskTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/MTouchTaskTests.cs @@ -9,6 +9,7 @@ namespace Xamarin.iOS.Tasks { + // after I merged main class CustomMTouchTask : MTouchTaskBase { public CustomMTouchTask () From 323313c6307318e6545c51847159022cf1d05204 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:01:54 -0500 Subject: [PATCH 13/22] wrong label --- .github/workflows/localization-update.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/localization-update.yml b/.github/workflows/localization-update.yml index 288e42776eb2..993cdd172426 100644 --- a/.github/workflows/localization-update.yml +++ b/.github/workflows/localization-update.yml @@ -18,7 +18,7 @@ jobs: destination_branch: "AutomatingLocalizationGHATest" pr_title: "[Localization] Pulling New Localization Translations $GITHUB_RUN_ID" pr_body: "Automated PR. Bring new translated changes in the lcl files for OneLocBuild to create translated resx files." - pr_label: "not-notes-worthy" + pr_label: "localization_bot" pr_milestone: "Future" pr_allow_empty: false github_token: ${{ secrets.GITHUB_TOKEN }} From f61749de7949005035546958ccb8621f182ceac4 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:05:43 -0500 Subject: [PATCH 14/22] fire --- .../TaskTests/ParseBundlerArgumentsTests.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs index 35296103f548..2d9e5a1dd01b 100644 --- a/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs +++ b/tests/msbuild/Xamarin.MacDev.Tasks.Tests/TaskTests/ParseBundlerArgumentsTests.cs @@ -8,6 +8,7 @@ namespace Xamarin.iOS.Tasks { + // . [TestFixture] public class ParseBundlerArgumentsTests : TestBase { From fa82f9e2f34e6959da36d8eafcdf9e7b4697b346 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:08:58 -0500 Subject: [PATCH 15/22] adding sync to this branch --- .../workflows/localization_branch_sync.yml | 46 +++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 .github/workflows/localization_branch_sync.yml diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml new file mode 100644 index 000000000000..bb9d833ec123 --- /dev/null +++ b/.github/workflows/localization_branch_sync.yml @@ -0,0 +1,46 @@ +name: Sync Localization Branch +on: + pull_request: + branches: + - 'AutomatingLocalizationGHATest' + types: [closed] + +env: + # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} + +jobs: + delete_branch: + name: 'Delete Localization branch' + runs-on: ubuntu-latest + steps: + - uses: dawidd6/action-delete-branch@v3 + name: 'delete' + if: ${{ env.FROM_LEGO == true }} + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branches: AutomatingLocalizationGHATest2 + + checkout_localization_branch: + name: 'Checkout the Localization branch' + runs-on: ubuntu-latest + needs: delete_branch + if: ${{ env.FROM_LEGO == true }} + steps: + - uses: actions/checkout@v2 + name: 'checkout' + with: + repository: ${{ github.repository }} + ref: 'AutomatingLocalizationGHATest2' + + push_to_localization_branch: + name: 'Push to Localization branch' + runs-on: ubuntu-latest + needs: checkout_localization_branch + if: ${{ env.FROM_LEGO == true }} + steps: + - uses: ad-m/github-push-action@master + name: push + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: 'AutomatingLocalizationGHATest2' From d4add13d9423410ff2a5b9573cd66138e563bb5a Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:18:05 -0500 Subject: [PATCH 16/22] fixing env variable --- .github/workflows/localization_branch_sync.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index bb9d833ec123..f840992d9cd6 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -5,14 +5,13 @@ on: - 'AutomatingLocalizationGHATest' types: [closed] -env: - # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label - FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} - jobs: delete_branch: name: 'Delete Localization branch' runs-on: ubuntu-latest + env: + # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - uses: dawidd6/action-delete-branch@v3 name: 'delete' @@ -25,6 +24,8 @@ jobs: name: 'Checkout the Localization branch' runs-on: ubuntu-latest needs: delete_branch + env: + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} if: ${{ env.FROM_LEGO == true }} steps: - uses: actions/checkout@v2 @@ -37,6 +38,8 @@ jobs: name: 'Push to Localization branch' runs-on: ubuntu-latest needs: checkout_localization_branch + env: + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} if: ${{ env.FROM_LEGO == true }} steps: - uses: ad-m/github-push-action@master From 8e52bbf2d333c2f09a1573618da139d49365c966 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:25:41 -0500 Subject: [PATCH 17/22] conditionals in the wrong place --- .github/workflows/localization_branch_sync.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index f840992d9cd6..97e57071a47c 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -26,10 +26,10 @@ jobs: needs: delete_branch env: FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} - if: ${{ env.FROM_LEGO == true }} steps: - uses: actions/checkout@v2 name: 'checkout' + if: ${{ env.FROM_LEGO == true }} with: repository: ${{ github.repository }} ref: 'AutomatingLocalizationGHATest2' @@ -40,10 +40,10 @@ jobs: needs: checkout_localization_branch env: FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} - if: ${{ env.FROM_LEGO == true }} steps: - uses: ad-m/github-push-action@master name: push + if: ${{ env.FROM_LEGO == true }} with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: 'AutomatingLocalizationGHATest2' From 661e976d673438007b059f40e6c2a583c00871b1 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:36:03 -0500 Subject: [PATCH 18/22] add debugging --- .github/workflows/localization_branch_sync.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index 97e57071a47c..4467846a2e23 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -6,6 +6,24 @@ on: types: [closed] jobs: + print_info: + name: 'Print Information' + runs-on: ubuntu-latest + steps: + - name: "Get Pull Request Status" + run: | + echo "${{ github.event.pull_request.merged }}" + - name: "Get Username" + run: | + echo "${{ github.event.pull_request.user.login }}" + - name: "Get if using Localization-bot label" + run: | + echo "${{ contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" + - name: "FROM_LEGO" + run: | + echo "${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" + + delete_branch: name: 'Delete Localization branch' runs-on: ubuntu-latest From c783d54f4ee9afbe86a236af6fddcf2c0cf4f121 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:42:34 -0500 Subject: [PATCH 19/22] more debugging --- .github/workflows/localization_branch_sync.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index 4467846a2e23..a5771c586e69 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -16,12 +16,18 @@ jobs: - name: "Get Username" run: | echo "${{ github.event.pull_request.user.login }}" + - name: "Get label names" + run: | + echo "${{ github.event.pull_request.labels.*.names }}" + - name: "Get labels" + run: | + echo "${{ github.event.pull_request.labels }}" - name: "Get if using Localization-bot label" run: | echo "${{ contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" - name: "FROM_LEGO" run: | - echo "${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" + echo "${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" delete_branch: @@ -29,7 +35,7 @@ jobs: runs-on: ubuntu-latest env: # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label - FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - uses: dawidd6/action-delete-branch@v3 name: 'delete' From 3d0ea49b201e58dc7510cf787c4232bc2a365d99 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 15:55:28 -0500 Subject: [PATCH 20/22] changing the label requirement for the tests --- .github/workflows/localization_branch_sync.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index e32ac644e642..ccd13b968336 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -34,7 +34,7 @@ jobs: runs-on: ubuntu-latest env: # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label - FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - uses: dawidd6/action-delete-branch@v3 name: 'delete' @@ -48,7 +48,7 @@ jobs: runs-on: ubuntu-latest needs: delete_branch env: - FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - uses: actions/checkout@v2 name: 'checkout' @@ -62,7 +62,7 @@ jobs: runs-on: ubuntu-latest needs: checkout_localization_branch env: - FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - uses: ad-m/github-push-action@master name: push From d6087d7f4561504979fb49c79dbb0cc8f302ba09 Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 16:02:52 -0500 Subject: [PATCH 21/22] more debugging 2 --- .github/workflows/localization_branch_sync.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index ccd13b968336..d6d264df1db3 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -25,9 +25,15 @@ jobs: - name: "Get if using Localization-bot label" run: | echo "${{ contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" - - name: "FROM_LEGO" + - name: "new FROM_LEGO" run: | - echo "${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' && contains(github.event.pull_request.labels.*.names, 'localization_bot') }}" + echo "${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }}" + - name: "Merged is true" + run: | + echo "${{ github.event.pull_request.merged == true }}" + - name: "login is correct" + run: | + echo "${{ github.event.pull_request.user.login == 'github-actions[bot]' }}" delete_branch: name: 'Delete Localization branch' From 229d39d6e6809bee310a578a4b837cdd97a4b92e Mon Sep 17 00:00:00 2001 From: tj_devel709 Date: Fri, 4 Jun 2021 16:24:39 -0500 Subject: [PATCH 22/22] try more debugging --- .github/workflows/localization_branch_sync.yml | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/.github/workflows/localization_branch_sync.yml b/.github/workflows/localization_branch_sync.yml index d6d264df1db3..08aa786f8621 100644 --- a/.github/workflows/localization_branch_sync.yml +++ b/.github/workflows/localization_branch_sync.yml @@ -9,6 +9,9 @@ jobs: print_info: name: 'Print Information' runs-on: ubuntu-latest + env: + # We want to do the sync if we merged the pull request, the author was 'github-actions', and it has the correct label + FROM_LEGO: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} steps: - name: "Get Pull Request Status" run: | @@ -34,6 +37,9 @@ jobs: - name: "login is correct" run: | echo "${{ github.event.pull_request.user.login == 'github-actions[bot]' }}" + - name: "Can we access the variable?" + run: | + echo "${{ env.FROM_LEGO == true }}" delete_branch: name: 'Delete Localization branch' @@ -44,7 +50,7 @@ jobs: steps: - uses: dawidd6/action-delete-branch@v3 name: 'delete' - if: ${{ env.FROM_LEGO == true }} + if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} with: github_token: ${{ secrets.GITHUB_TOKEN }} branches: AutomatingLocalizationGHATest2 @@ -58,7 +64,7 @@ jobs: steps: - uses: actions/checkout@v2 name: 'checkout' - if: ${{ env.FROM_LEGO == true }} + if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} with: repository: ${{ github.repository }} ref: 'AutomatingLocalizationGHATest2' @@ -72,7 +78,7 @@ jobs: steps: - uses: ad-m/github-push-action@master name: push - if: ${{ env.FROM_LEGO == true }} + if: ${{ github.event.pull_request.merged == true && github.event.pull_request.user.login == 'github-actions[bot]' }} # && contains(github.event.pull_request.labels.*.names, 'localization_bot') }} with: github_token: ${{ secrets.GITHUB_TOKEN }} branch: 'AutomatingLocalizationGHATest2'