File tree Expand file tree Collapse file tree 2 files changed +20
-4
lines changed
packages/sources/stader-balance/test/integration Expand file tree Collapse file tree 2 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 7373 - name : Compile tests
7474 env :
7575 CHANGED_PACKAGES : ${{ needs.install-packages.outputs.changed-packages }}
76- run : yarn tsc -b --noEmit $(echo $CHANGED_PACKAGES | jq '.[].location + "/tsconfig.test.json"' -r | grep -v -E '/composites/dydx-rewards/|/composites/glv-token/|/composites/gm-token/|/core/bootstrap/|/sources/aleno/|/sources/bitgo-reserves-test/|/sources/bitgo-reserves/|/sources/coinpaprika/|/sources/cryptocompare/|/sources/dlc-btc-por/|/sources/eth-beacon/|/sources/icap/|/sources/ipfs/|/sources/layer2-sequencer-health/|/sources/por-address-list/|/sources/s3-csv-reader/|/sources/stader-balance/|/sources/token-balance/|/sources/view-function-multi-chain/|sources/view-function/')
76+ FAILING_TESTS_PATTERN : ' /composites/dydx-rewards/|/composites/glv-token/|/composites/gm-token/|/core/bootstrap/|/sources/aleno/|/sources/bitgo-reserves-test/|/sources/bitgo-reserves/|/sources/coinpaprika/|/sources/cryptocompare/|/sources/dlc-btc-por/|/sources/eth-beacon/|/sources/icap/|/sources/ipfs/|/sources/layer2-sequencer-health/|/sources/por-address-list/|/sources/s3-csv-reader/|/sources/token-balance/|/sources/view-function-multi-chain/|sources/view-function/'
77+ run : |
78+ # Tests that should compile:
79+ yarn tsc -b --noEmit $(echo $CHANGED_PACKAGES | jq '.[].location + "/tsconfig.test.json"' -r | grep -v -E "$FAILING_TESTS_PATTERN")
80+ # Tests that should not compile:
81+ for package in $(echo "$CHANGED_PACKAGES" | jq '.[].location + "/"' -r | grep -E "$FAILING_TESTS_PATTERN"); do
82+ if yarn tsc -b --noEmit "${package}tsconfig.test.json"; then
83+ echo "Compilation succeeded for $package. Remove it from FAILING_TESTS_PATTERN so it doesn't break again in the future."
84+ exit 1
85+ fi
86+ done
7787
7888 # Run unit tests
7989 unit-tests :
Original file line number Diff line number Diff line change 1+ import type BigNumber from 'bignumber.js'
12import {
23 addressData ,
34 mockCollateralEthMap ,
@@ -17,11 +18,16 @@ import {
1718import { deferredPromise , sleep } from '@chainlink/external-adapter-framework/util'
1819import * as nock from 'nock'
1920
20- const totalPenaltyAmountCalls = { }
21+ type TotalPenaltyAmountCall = {
22+ resolve : ( ) => void
23+ promise : Promise < BigNumber >
24+ }
25+
26+ const totalPenaltyAmountCalls : Record < string , TotalPenaltyAmountCall > = { }
2127
22- const getTotalPenaltyAmount = ( address ) => {
28+ const getTotalPenaltyAmount = ( address : string ) => {
2329 if ( ! ( address in totalPenaltyAmountCalls ) ) {
24- const [ promise , resolve ] = deferredPromise ( )
30+ const [ promise , resolve ] = deferredPromise < BigNumber > ( )
2531 totalPenaltyAmountCalls [ address ] = {
2632 resolve : ( ) => resolve ( mockPenaltyMap [ address ] ) ,
2733 promise,
You can’t perform that action at this time.
0 commit comments