Skip to content

Commit

Permalink
kit run-tests: add minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Sep 11, 2024
1 parent 6c5c8ec commit f4aecaf
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 13 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,32 +82,51 @@ jobs:
run: tar zxf foundry.tar.gz
- name: Add Foundry to path
run: echo "$PWD" >> $GITHUB_PATH

- name: Get latest release from kinode-dao/kit
id: get-latest-kit-release
uses: actions/github-script@v6
with:
script: |
const repo = {
owner: 'kinode-dao',
repo: 'kit',
};
const release = await github.rest.repos.getLatestRelease(repo);
const asset = release.data.assets.find(asset => asset.name.match(/kit-x86_64-unknown-linux-gnu\.zip/));
if (!asset) {
throw new Error('Asset not found');
}
return asset.browser_download_url;
result-encoding: string
- name: Download the Kit release
run: wget -q ${DOWNLOAD_URL} -O kit.zip
env:
DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }}
- name: Unzip the release
run: unzip kit.zip

#- name: Get latest release from kinode-dao/kit
# id: get-latest-kit-release
# uses: actions/github-script@v6
# with:
# script: |
# const repo = {
# owner: 'kinode-dao',
# repo: 'kit',
# repo: 'kinode',
# };
# const release = await github.rest.repos.getLatestRelease(repo);
# const asset = release.data.assets.find(asset => asset.name.match(/kit-x86_64-unknown-linux-gnu\.zip/));
# const asset = release.data.assets.find(asset => asset.name.match(/kinode-x86_64-unknown-linux-gnu\.zip/));
# if (!asset) {
# throw new Error('Asset not found');
# }
# return asset.browser_download_url;
# result-encoding: string
- name: Download the Kit release
run: wget -q https://files.yael.solutions/240906/kit-x86_64-unknown-linux-gnu.zip -O kit.zip
#run: wget -q ${DOWNLOAD_URL} -O kit.zip
#env:
# DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }}
- name: Unzip the release
run: unzip kit.zip

- name: Download the Kinode release
run: wget -q https://files.yael.solutions/240906/kinode-x86_64-unknown-linux-gnu-simulation-mode.zip -O kinode.zip
#run: wget -q ${DOWNLOAD_URL} -O kinode.zip
#env:
# DOWNLOAD_URL: ${{ steps.get-latest-kit-release.outputs.result }}
- name: Unzip the Kinode release
run: unzip kinode.zip

Expand Down
2 changes: 1 addition & 1 deletion code/mfa_fe_demo/test/tests.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ setup_packages = [
setup_scripts = []
test_package_paths = ["mfa_fe_demo_test"]
test_scripts = [
{ path = "../curl-endpoint.sh", args = "" },
"../curl-endpoint.sh",
]
timeout_secs = 5
fakechain_router = 8545
Expand Down
4 changes: 2 additions & 2 deletions src/kit/run-tests.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,9 @@ Key | Value Type
-------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | -----------------
`dependency_package_paths` | Array of Strings (`PathBuf`s) | Paths to packages to load onto dependency node so that setup or test packages can fetch them to fulfil `dependencies`
`setup_packages` | Array of Tables [(`SetupPackage`s)](https://github.com/kinode-dao/kit/blob/10e2bd5d44cf44690c2360e60523ac5b06d1d5f0/src/run_tests/types.rs#L37-L40) | Each Table in the Array contains `path` (to the package) and `run` (whether or not to run the package or merely load it in)
`setup_scripts` | Array of Tables [(`Script`s)](https://github.com/kinode-dao/kit/blob/10e2bd5d44cf44690c2360e60523ac5b06d1d5f0/src/run_tests/types.rs#L43-L46) | Each Table in the Array contains `path` (to the script) and `args` (to be passed to the script); these scripts will run alongside the test nodes
`setup_scripts` | Array of Strings (`bash` line) | Each Table in the Array contains `path` (to the script) and `args` (to be passed to the script); these scripts will run alongside the test nodes
`test_package_paths` | Array of Strings (`PathBuf`s) | Paths to test packages to run
`test_scripts` | Array of [`Script`s](https://github.com/kinode-dao/kit/blob/10e2bd5d44cf44690c2360e60523ac5b06d1d5f0/src/run_tests/types.rs#L43-L46) | Each Table in the Array contains `path` (to the script) and `args` (to be passed to the script); these scripts will be run as tests and must return a `0` on success
`test_scripts` | Array of Strings (`bash` line) | Each Table in the Array contains `path` (to the script) and `args` (to be passed to the script); these scripts will be run as tests and must return a `0` on success
`timeout_secs` | Integer > 0 | Timeout for this entire series of test packages
`fakechain_router` | Integer >= 0 | Port to be bound by anvil, where fakechain will be hosted
[`nodes`](#nodes) | Array of Tables | Each Table specifies configuration of one node to spin up for test
Expand Down

0 comments on commit f4aecaf

Please sign in to comment.