From f0809719b63329c555593f4d71e742230eeb061b Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 27 Jul 2022 10:41:57 +0100 Subject: [PATCH 1/2] chore: moving scripts from .github directory into cmd --- .github/workflows/e2e-fork.yml | 2 +- .github/workflows/e2e.yaml | 4 ++-- Makefile | 2 +- .../build_test_matrix.go => cmd/build_test_matrix/main.go | 0 .../build_test_matrix/main_test.go | 0 .../determine_simd_tag.go => cmd/determine_simd_tag/main.go | 0 6 files changed, 4 insertions(+), 4 deletions(-) rename .github/scripts/build_test_matrix.go => cmd/build_test_matrix/main.go (100%) rename .github/scripts/build_test_matrix_test.go => cmd/build_test_matrix/main_test.go (100%) rename .github/scripts/determine_simd_tag.go => cmd/determine_simd_tag/main.go (100%) diff --git a/.github/workflows/e2e-fork.yml b/.github/workflows/e2e-fork.yml index 8d7e510fe22..d3717d2c35a 100644 --- a/.github/workflows/e2e-fork.yml +++ b/.github/workflows/e2e-fork.yml @@ -20,7 +20,7 @@ jobs: with: go-version: 1.18 - id: set-matrix - run: echo "::set-output name=matrix::$(go run .github/scripts/build_test_matrix.go)" + run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" e2e: env: diff --git a/.github/workflows/e2e.yaml b/.github/workflows/e2e.yaml index 62ca1f2a919..ae4d29e7b51 100644 --- a/.github/workflows/e2e.yaml +++ b/.github/workflows/e2e.yaml @@ -51,7 +51,7 @@ jobs: with: go-version: 1.18 - id: set-matrix - run: echo "::set-output name=matrix::$(go run .github/scripts/build_test_matrix.go)" + run: echo "::set-output name=matrix::$(go run cmd/build_test_matrix/main.go)" # the tag of the image will differ if this is a PR or the branch is being merged into main. @@ -68,7 +68,7 @@ jobs: go-version: 1.18 - id: get-tag run: | - tag=$(go run .github/scripts/determine_simd_tag.go -pr "${{ github.event.pull_request.number }}" ) + tag=$(go run cmd/determine_simd_tag/main.go -pr "${{ github.event.pull_request.number }}" ) echo "Using tag $tag" echo "::set-output name=simd-tag::$tag" diff --git a/Makefile b/Makefile index 2fe75ee0555..eba4b5c2de2 100644 --- a/Makefile +++ b/Makefile @@ -218,7 +218,7 @@ view-docs: test: test-unit test-all: test-unit test-ledger-mock test-race test-cover -TEST_PACKAGES=./... ./.github/scripts +TEST_PACKAGES=./... TEST_TARGETS := test-unit test-unit-amino test-unit-proto test-ledger-mock test-race test-ledger test-race # Test runs-specific rules. To add a new test target, just add diff --git a/.github/scripts/build_test_matrix.go b/cmd/build_test_matrix/main.go similarity index 100% rename from .github/scripts/build_test_matrix.go rename to cmd/build_test_matrix/main.go diff --git a/.github/scripts/build_test_matrix_test.go b/cmd/build_test_matrix/main_test.go similarity index 100% rename from .github/scripts/build_test_matrix_test.go rename to cmd/build_test_matrix/main_test.go diff --git a/.github/scripts/determine_simd_tag.go b/cmd/determine_simd_tag/main.go similarity index 100% rename from .github/scripts/determine_simd_tag.go rename to cmd/determine_simd_tag/main.go From d64cdc64c037c6f8cfc48302426b60d8496e1601 Mon Sep 17 00:00:00 2001 From: Cian Hatton Date: Wed, 27 Jul 2022 10:45:39 +0100 Subject: [PATCH 2/2] chore: removing reference to .github/scripts --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1164a1a1c22..09add80b02b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -57,7 +57,7 @@ jobs: steps: - uses: actions/checkout@v3 - name: Create a file with all the pkgs - run: go list ./... ./.github/scripts > pkgs.txt + run: go list ./... > pkgs.txt - name: Split pkgs into 4 files run: split -d -n l/4 pkgs.txt pkgs.txt.part. # cache multiple