From b5356375f1185121a4798a0efbf3e91696a9b59f Mon Sep 17 00:00:00 2001 From: robGG1997 Date: Thu, 14 Sep 2023 11:30:11 +0300 Subject: [PATCH 1/9] Revert "automated duplicating imported samples modifications (#595)" This reverts commit a5558941827a91df51e2dd200648dcd13a1231c8. --- .github/workflows/duplicate_sample.yaml | 28 ------------------- duplicate_package_sample.sh | 14 ---------- .../Samples~/Web3.Unity/Prefabs.meta | 8 ------ .../Samples~/Web3.Unity/Scenes.meta | 8 ------ .../Samples~/Web3.Unity/Scripts.meta | 8 ------ .../Samples~/Web3.Unity/Sprites.meta | 8 ------ 6 files changed, 74 deletions(-) delete mode 100644 .github/workflows/duplicate_sample.yaml delete mode 100644 duplicate_package_sample.sh delete mode 100644 src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs.meta delete mode 100644 src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes.meta delete mode 100644 src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts.meta delete mode 100644 src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Sprites.meta diff --git a/.github/workflows/duplicate_sample.yaml b/.github/workflows/duplicate_sample.yaml deleted file mode 100644 index 793149e56..000000000 --- a/.github/workflows/duplicate_sample.yaml +++ /dev/null @@ -1,28 +0,0 @@ -name: Duplicate-Package-Sample - -on: - push: - branches: - - main - -jobs: - duplicate: - name: duplicate package sample - runs-on: ubuntu-latest - - steps: - - name: Checkout Repository - uses: actions/checkout@v2 - - - name: Run duplicate script file - run: bash ${GITHUB_WORKSPACE}/duplicate_package_sample.sh - - - name: Commit and Push - run: | - git config --global user.email $git_email - git config --global user.name "${{ github.actor }}" - git add ./src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/. -f - git diff-index --cached --quiet HEAD || git commit -m "Auto-duplicate Package Samples" - git push - env: - git_email: "${{ github.actor }}@users.noreply.github.com" \ No newline at end of file diff --git a/duplicate_package_sample.sh b/duplicate_package_sample.sh deleted file mode 100644 index f3a677742..000000000 --- a/duplicate_package_sample.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash - -# Specify the source directory and the destination directory -SOURCE_DIRECTORY="src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0-pre001/Web3.Unity Samples/" -DESTINATION_DIRECTORY="src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/" - -# clear destination directory first -rm -r "$DESTINATION_DIRECTORY" - -# Copy source to the destination -cp -r "$SOURCE_DIRECTORY" "$DESTINATION_DIRECTORY" - -#add all modified files -git add "src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/." -f \ No newline at end of file diff --git a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs.meta b/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs.meta deleted file mode 100644 index 5b35daff8..000000000 --- a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 45a04d2621549e3458049c6c447c3941 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes.meta b/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes.meta deleted file mode 100644 index 5488a62ed..000000000 --- a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: f39f8dda9616349489a7803d7e0aff30 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts.meta b/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts.meta deleted file mode 100644 index 9a1e8b8d4..000000000 --- a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: eaef630f284e6e04a88b5939e0eb1cc5 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Sprites.meta b/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Sprites.meta deleted file mode 100644 index 7175ee89d..000000000 --- a/src/UnityPackages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Sprites.meta +++ /dev/null @@ -1,8 +0,0 @@ -fileFormatVersion: 2 -guid: 0c06517aee7843642a091a67c72b1379 -folderAsset: yes -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From cd514db5c9d0bb82e069293c669733864d41544e Mon Sep 17 00:00:00 2001 From: robGG1997 Date: Wed, 7 Feb 2024 13:35:15 +0300 Subject: [PATCH 2/9] made main package testable, revert due to a mistake --- src/UnitySampleProject/Packages/manifest.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/UnitySampleProject/Packages/manifest.json b/src/UnitySampleProject/Packages/manifest.json index 08c0ac92f..22a37ba40 100644 --- a/src/UnitySampleProject/Packages/manifest.json +++ b/src/UnitySampleProject/Packages/manifest.json @@ -47,5 +47,8 @@ "com.unity.modules.wind": "1.0.0", "com.unity.modules.xr": "1.0.0", "com.tools.webglthreadingpatcher": "https://github.com/VolodymyrBS/WebGLThreadingPatcher.git" - } + }, + "testables": [ + "io.chainsafe.web3-unity" + ] } \ No newline at end of file From e3628f2fc975e7d58bb78d288c97595d8be042ce Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 12:23:23 +0300 Subject: [PATCH 3/9] initial test --- .github/workflows/check_and_commit.yml | 1 - ..._request_checks.yml => pull_request_checks.yml} | 10 ++-------- .github/workflows/pull_request_checks_dev.yml | 14 ++++++++++++++ .github/workflows/pull_request_checks_main.yml | 14 ++++++++++++++ ...push_checks_and_commits.yml => push_checks.yml} | 0 5 files changed, 30 insertions(+), 9 deletions(-) rename .github/workflows/{pre_pull_request_checks.yml => pull_request_checks.yml} (81%) create mode 100644 .github/workflows/pull_request_checks_dev.yml create mode 100644 .github/workflows/pull_request_checks_main.yml rename .github/workflows/{post_push_checks_and_commits.yml => push_checks.yml} (100%) diff --git a/.github/workflows/check_and_commit.yml b/.github/workflows/check_and_commit.yml index 4c09917c6..fa474dae4 100644 --- a/.github/workflows/check_and_commit.yml +++ b/.github/workflows/check_and_commit.yml @@ -127,7 +127,6 @@ jobs: name: Coverage results for ${{ matrix.testMode }} path: ${{ steps.tests.outputs.coveragePath }} - name: Commit and Push changes - if: ${{ github.ref_name == 'dev' }} run: | git diff-index --cached --quiet HEAD || git commit -m 'Auto Commit [skip ci] - Duplicate Packages Samples diff --git a/.github/workflows/pre_pull_request_checks.yml b/.github/workflows/pull_request_checks.yml similarity index 81% rename from .github/workflows/pre_pull_request_checks.yml rename to .github/workflows/pull_request_checks.yml index 221f52325..6a7966e1b 100644 --- a/.github/workflows/pre_pull_request_checks.yml +++ b/.github/workflows/pull_request_checks.yml @@ -1,13 +1,7 @@ -name: Merge Checks +name: Pull Request Checks on: - pull_request: - branches: - - main - - dev - types: - - labeled - - ready_for_review + workflow_call: jobs: web3_tests: diff --git a/.github/workflows/pull_request_checks_dev.yml b/.github/workflows/pull_request_checks_dev.yml new file mode 100644 index 000000000..8b9f04689 --- /dev/null +++ b/.github/workflows/pull_request_checks_dev.yml @@ -0,0 +1,14 @@ +name: Merge Checks + +on: + pull_request: + branches: + - dev + types: + - labeled + - ready_for_review + +jobs: + pull_reqest_checks: + name: Pull Request Checks + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yaml@main \ No newline at end of file diff --git a/.github/workflows/pull_request_checks_main.yml b/.github/workflows/pull_request_checks_main.yml new file mode 100644 index 000000000..07d55629b --- /dev/null +++ b/.github/workflows/pull_request_checks_main.yml @@ -0,0 +1,14 @@ +name: Merge Checks + +on: + pull_request: + branches: + - main + types: + - labeled + - ready_for_review + +jobs: + pull_reqest_checks: + name: Pull Request Checks + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yaml@rob/ci-fixes \ No newline at end of file diff --git a/.github/workflows/post_push_checks_and_commits.yml b/.github/workflows/push_checks.yml similarity index 100% rename from .github/workflows/post_push_checks_and_commits.yml rename to .github/workflows/push_checks.yml From f436d392f5da9b0ba3335b44a651a69448cf1b57 Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 12:28:41 +0300 Subject: [PATCH 4/9] typo fix --- .github/workflows/pull_request_checks_dev.yml | 2 +- .github/workflows/pull_request_checks_main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request_checks_dev.yml b/.github/workflows/pull_request_checks_dev.yml index 8b9f04689..d1eaa096a 100644 --- a/.github/workflows/pull_request_checks_dev.yml +++ b/.github/workflows/pull_request_checks_dev.yml @@ -11,4 +11,4 @@ on: jobs: pull_reqest_checks: name: Pull Request Checks - uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yaml@main \ No newline at end of file + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@main \ No newline at end of file diff --git a/.github/workflows/pull_request_checks_main.yml b/.github/workflows/pull_request_checks_main.yml index 07d55629b..50930486d 100644 --- a/.github/workflows/pull_request_checks_main.yml +++ b/.github/workflows/pull_request_checks_main.yml @@ -11,4 +11,4 @@ on: jobs: pull_reqest_checks: name: Pull Request Checks - uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yaml@rob/ci-fixes \ No newline at end of file + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@rob/ci-fixes \ No newline at end of file From 29a7af8f790ee6a946ff14aa58fa852900d9327d Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 12:47:17 +0300 Subject: [PATCH 5/9] inherit secrets --- .github/workflows/pull_request_checks_dev.yml | 3 ++- .github/workflows/pull_request_checks_main.yml | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request_checks_dev.yml b/.github/workflows/pull_request_checks_dev.yml index d1eaa096a..de90a098f 100644 --- a/.github/workflows/pull_request_checks_dev.yml +++ b/.github/workflows/pull_request_checks_dev.yml @@ -11,4 +11,5 @@ on: jobs: pull_reqest_checks: name: Pull Request Checks - uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@main \ No newline at end of file + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@main + secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pull_request_checks_main.yml b/.github/workflows/pull_request_checks_main.yml index 50930486d..dfd7f842e 100644 --- a/.github/workflows/pull_request_checks_main.yml +++ b/.github/workflows/pull_request_checks_main.yml @@ -11,4 +11,5 @@ on: jobs: pull_reqest_checks: name: Pull Request Checks - uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@rob/ci-fixes \ No newline at end of file + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@rob/ci-fixes + secrets: inherit \ No newline at end of file From 4f8904d391bde9656f1d878132e4ead2c1ddace7 Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 13:26:46 +0300 Subject: [PATCH 6/9] test branch updated --- .github/workflows/pull_request_checks.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pull_request_checks.yml b/.github/workflows/pull_request_checks.yml index 6a7966e1b..4aaa2ba83 100644 --- a/.github/workflows/pull_request_checks.yml +++ b/.github/workflows/pull_request_checks.yml @@ -15,6 +15,6 @@ jobs: unity_tests: name: Unity Tests if: ${{ github.base_ref == 'main' }} - uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yml@main + uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yml@rob/ci-fixes needs: [ analyze_code ] secrets: inherit \ No newline at end of file From f8c74618d1574e119d5b0d3078c7463659d77ab1 Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 14:23:32 +0300 Subject: [PATCH 7/9] possible push fix --- .github/workflows/check_and_commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/check_and_commit.yml b/.github/workflows/check_and_commit.yml index fa474dae4..3a9ededfe 100644 --- a/.github/workflows/check_and_commit.yml +++ b/.github/workflows/check_and_commit.yml @@ -131,4 +131,4 @@ jobs: git diff-index --cached --quiet HEAD || git commit -m 'Auto Commit [skip ci] - Duplicate Packages Samples - Publish DLL Dependencies' - git push -f \ No newline at end of file + git push -f origin HEAD:${{ github.ref_name }} \ No newline at end of file From 4861288fb5e50882fbd8dbf936f493fe04e0a64d Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 15:16:30 +0300 Subject: [PATCH 8/9] branch name fix --- .github/workflows/check_and_commit.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/check_and_commit.yml b/.github/workflows/check_and_commit.yml index 3a9ededfe..215e0243a 100644 --- a/.github/workflows/check_and_commit.yml +++ b/.github/workflows/check_and_commit.yml @@ -131,4 +131,6 @@ jobs: git diff-index --cached --quiet HEAD || git commit -m 'Auto Commit [skip ci] - Duplicate Packages Samples - Publish DLL Dependencies' - git push -f origin HEAD:${{ github.ref_name }} \ No newline at end of file + git push -f origin HEAD:$branch + env: + branch: ${{ github.head_ref || github.ref_name }} \ No newline at end of file From 13d3fc6e82654fab0a970da17753021a698a63c0 Mon Sep 17 00:00:00 2001 From: rob1997 Date: Mon, 14 Oct 2024 15:49:15 +0300 Subject: [PATCH 9/9] branch name reverted --- .github/workflows/pull_request_checks.yml | 2 +- .github/workflows/pull_request_checks_main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/pull_request_checks.yml b/.github/workflows/pull_request_checks.yml index 4aaa2ba83..6a7966e1b 100644 --- a/.github/workflows/pull_request_checks.yml +++ b/.github/workflows/pull_request_checks.yml @@ -15,6 +15,6 @@ jobs: unity_tests: name: Unity Tests if: ${{ github.base_ref == 'main' }} - uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yml@rob/ci-fixes + uses: ChainSafe/web3.unity/.github/workflows/check_and_commit.yml@main needs: [ analyze_code ] secrets: inherit \ No newline at end of file diff --git a/.github/workflows/pull_request_checks_main.yml b/.github/workflows/pull_request_checks_main.yml index dfd7f842e..8757cbd12 100644 --- a/.github/workflows/pull_request_checks_main.yml +++ b/.github/workflows/pull_request_checks_main.yml @@ -11,5 +11,5 @@ on: jobs: pull_reqest_checks: name: Pull Request Checks - uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@rob/ci-fixes + uses: ChainSafe/web3.unity/.github/workflows/pull_request_checks.yml@main secrets: inherit \ No newline at end of file