-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10622 from smartcontractkit/release/2.5.0
release/2.5.0 -> master
- Loading branch information
Showing
1,033 changed files
with
89,659 additions
and
38,328 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
name: Setup Cosmos wasmd | ||
description: Setup Cosmos wasmd, used for integration tests | ||
runs: | ||
using: composite | ||
steps: | ||
- uses: actions/cache@v3 | ||
id: cache | ||
name: Cache wasmd-build | ||
with: | ||
path: ~/wasmd-build | ||
# this caching works without cloning the repo because the install_wasmd contains | ||
# the commit hash. | ||
key: ${{ runner.os }}-wasmd-cli-${{ hashFiles('./tools/ci/install_wasmd') }} | ||
|
||
- if: ${{ steps.cache.outputs.cache-hit != 'true' }} | ||
name: Install wasmd | ||
shell: bash | ||
run: ./tools/ci/install_wasmd | ||
|
||
- name: Export wasmd path to env | ||
shell: bash | ||
run: echo "PATH=$HOME/wasmd-build/bin:$PATH" >> $GITHUB_ENV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import { execSync } from "child_process"; | ||
import { | ||
GolangConfig, | ||
GoSplits, | ||
GoPackageData, | ||
TestsBySplit, | ||
} from "../types.mjs"; | ||
import { simpleSplit } from "../splitter.mjs"; | ||
|
||
export interface GetGoPackagesReturn { | ||
packages: string[]; | ||
testsBySplit: TestsBySplit; | ||
splits: GoSplits; | ||
serializedSplits: string | ||
} | ||
|
||
export function getPackageList( | ||
config: GolangConfig, | ||
): GetGoPackagesReturn { | ||
const { numOfSplits } = config; | ||
const rawPackages = execSync( | ||
"go list -json ./... | jq -s '[.[] | {ImportPath, TestGoFiles, XTestGoFiles}]'", | ||
{ encoding: "utf8" } | ||
); | ||
const packages: GoPackageData[] = JSON.parse(rawPackages.trimEnd()); | ||
const filteredData = packages.filter( | ||
(item) => (item.TestGoFiles && item.TestGoFiles.length > 0) || (item.XTestGoFiles && item.XTestGoFiles.length > 0) | ||
); | ||
const packagePaths = filteredData.map((item) => item.ImportPath); | ||
return handleSplit(packagePaths, numOfSplits); | ||
} | ||
|
||
function handleSplit( | ||
packages: string[], | ||
numOfSplits: number | ||
): GetGoPackagesReturn { | ||
console.log(`${packages.length} packages to split...`); | ||
const packagesBySplit = simpleSplit(packages, [], numOfSplits); | ||
const splits: GoSplits = packagesBySplit.map((pkgs, i) => ({ | ||
idx: `${i + 1}`, | ||
id: `${i + 1}/${numOfSplits}`, | ||
pkgs: pkgs.join(" "), | ||
})); | ||
const o: GetGoPackagesReturn = { | ||
packages, | ||
testsBySplit: packagesBySplit, | ||
splits, | ||
serializedSplits: JSON.stringify(splits), | ||
}; | ||
return o; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.