From e50c8df10cdbf3ff4e3e3c9be8ce630dd4f6e6c0 Mon Sep 17 00:00:00 2001 From: Marko Date: Wed, 8 Jul 2020 11:03:23 +0200 Subject: [PATCH] ci: bump codecov (#6638) --- .github/workflows/test.yml | 58 +++++++++++++++++++------------------- std/pubkey.go | 2 ++ 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1ad32b856d56..88595f0b18fe 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -15,9 +15,9 @@ jobs: GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" if: "!startsWith(github.ref, 'refs/tags/') && github.ref != 'refs/heads/master'" - split-test-files: + split-test-files: runs-on: ubuntu-latest - steps: + steps: - uses: actions/checkout@v2 - name: Create a file with all the pkgs run: go list ./... > pkgs.txt @@ -26,19 +26,19 @@ jobs: # cache multiple - uses: actions/upload-artifact@v2 with: - name: '${{ github.sha }}-aa' + name: "${{ github.sha }}-aa" path: ./xaa.txt - uses: actions/upload-artifact@v2 - with: - name: '${{ github.sha }}-ab' + with: + name: "${{ github.sha }}-ab" path: ./xab.txt - uses: actions/upload-artifact@v2 - with: - name: '${{ github.sha }}-ac' + with: + name: "${{ github.sha }}-ac" path: ./xac.txt - uses: actions/upload-artifact@v2 - with: - name: '${{ github.sha }}-ad' + with: + name: "${{ github.sha }}-ad" path: ./xad.txt test-coverage-run-1: @@ -53,10 +53,10 @@ jobs: SUFFIX_FILTER: | .go .mod - .sum + .sum - uses: actions/download-artifact@v2 with: - name: '${{ github.sha }}-aa' + name: "${{ github.sha }}-aa" if: "env.GIT_DIFF != ''" - name: test & coverage report creation run: | @@ -73,11 +73,11 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v1.0.10 with: file: ./coverage.txt - fail_ci_if_error: true - if: "env.GIT_DIFF != ''" + fail_ci_if_error: true + if: "env.GIT_DIFF != ''" test-coverage-run-2: runs-on: ubuntu-latest @@ -91,10 +91,10 @@ jobs: SUFFIX_FILTER: | .go .mod - .sum + .sum - uses: actions/download-artifact@v2 with: - name: '${{ github.sha }}-ab' + name: "${{ github.sha }}-ab" if: "env.GIT_DIFF != ''" - name: test & coverage report creation run: | @@ -111,11 +111,11 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v1.0.10 with: file: ./coverage.txt - fail_ci_if_error: true - if: "env.GIT_DIFF != ''" + fail_ci_if_error: true + if: "env.GIT_DIFF != ''" test-coverage-run-3: runs-on: ubuntu-latest @@ -129,10 +129,10 @@ jobs: SUFFIX_FILTER: | .go .mod - .sum + .sum - uses: actions/download-artifact@v2 with: - name: '${{ github.sha }}-ac' + name: "${{ github.sha }}-ac" if: "env.GIT_DIFF != ''" - name: test & coverage report creation run: | @@ -149,11 +149,11 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v1.0.10 with: file: ./coverage.txt - fail_ci_if_error: true - if: "env.GIT_DIFF != ''" + fail_ci_if_error: true + if: "env.GIT_DIFF != ''" test-coverage-run-4: runs-on: ubuntu-latest @@ -167,10 +167,10 @@ jobs: SUFFIX_FILTER: | .go .mod - .sum + .sum - uses: actions/download-artifact@v2 with: - name: '${{ github.sha }}-ad' + name: "${{ github.sha }}-ad" if: "env.GIT_DIFF != ''" - name: test & coverage report creation run: | @@ -187,11 +187,11 @@ jobs: sed -i.bak "/$(echo $filename | sed 's/\//\\\//g')/d" coverage.txt done if: "env.GIT_DIFF != ''" - - uses: codecov/codecov-action@v1 + - uses: codecov/codecov-action@v1.0.10 with: file: ./coverage.txt - fail_ci_if_error: true - if: "env.GIT_DIFF != ''" + fail_ci_if_error: true + if: "env.GIT_DIFF != ''" integration-tests: runs-on: ubuntu-latest diff --git a/std/pubkey.go b/std/pubkey.go index 0c86f1548133..35d72bbc731e 100644 --- a/std/pubkey.go +++ b/std/pubkey.go @@ -44,6 +44,7 @@ func (cdc DefaultPublicKeyCodec) Decode(key *types.PublicKey) (crypto.PubKey, er } var res sr25519.PubKeySr25519 copy(res[:], key.Sr25519) + return res, nil case *types.PublicKey_Multisig: pubKeys := key.Multisig.PubKeys @@ -55,6 +56,7 @@ func (cdc DefaultPublicKeyCodec) Decode(key *types.PublicKey) (crypto.PubKey, er } resKeys[i] = dk } + return multisig.NewPubKeyMultisigThreshold(int(key.Multisig.K), resKeys), nil default: return nil, fmt.Errorf("can't decode PubKey of type %T. Use a custom PublicKeyCodec instead", key)