Skip to content

Commit

Permalink
add testing workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nick1udwig committed Sep 12, 2024
1 parent 79aafce commit 82806e6
Show file tree
Hide file tree
Showing 2 changed files with 255 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/mdbook.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Deploy kit Create Release

on:
# Runs on pushes targeting the default branch
push:
branches: ["main", "v0.7.4"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

jobs:
build_and_test:
runs-on: ubuntu-latest

steps:
- name: Check out repository
uses: actions/checkout@v3
- name: Build the release
run: ./scripts/build-release.py
- name: Unzip the build output
run: unzip /tmp/kit-release/kit-x86_64-unknown-linux-gnu.zip

#- name: Get latest release from kinode-dao/kit
# id: get-latest-kinode-release
# uses: actions/github-script@v6
# with:
# script: |
# const repo = {
# owner: 'kinode-dao',
# repo: 'kinode',
# };
# const release = await github.rest.repos.getLatestRelease(repo);
# 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 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-kinode-release.outputs.result }}
- name: Unzip the Kinode release
run: unzip kinode.zip

- name: Run tests
run: ./kit t src/new/templates/test.toml
207 changes: 207 additions & 0 deletions src/new/templates/tests.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
# runtime = { FetchVersion = "latest" }
runtime = { RepoPath = "../../../kinode" }
persist_home = false
runtime_build_release = false


# [[tests]]
# dependency_package_paths = ["javascript/no-ui/chat"]
# setup_packages = [
# { path = "javascript/no-ui/chat", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["javascript/no-ui/chat/test/chat_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
# [[tests.nodes]]
# port = 8081
# home = "home/second"
# fake_node_name = "second.dev"
# runtime_verbosity = 2
#
#
# [[tests]]
# dependency_package_paths = []
# setup_packages = [
# { path = "javascript/no-ui/echo", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["javascript/no-ui/echo/test/echo_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
#
# [[tests]]
# dependency_package_paths = ["javascript/no-ui/fibonacci"]
# setup_packages = [
# { path = "javascript/no-ui/fibonacci", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["javascript/no-ui/fibonacci/test/fibonacci_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
#
# [[tests]]
# dependency_package_paths = ["python/no-ui/chat"]
# setup_packages = [
# { path = "python/no-ui/chat", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["python/no-ui/chat/test/chat_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
# [[tests.nodes]]
# port = 8081
# home = "home/second"
# fake_node_name = "second.dev"
# runtime_verbosity = 2
#
#
# [[tests]]
# dependency_package_paths = []
# setup_packages = [
# { path = "python/no-ui/echo", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["python/no-ui/echo/test/echo_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
#
# [[tests]]
# dependency_package_paths = ["python/no-ui/fibonacci"]
# setup_packages = [
# { path = "python/no-ui/fibonacci", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["python/no-ui/fibonacci/test/fibonacci_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2


[[tests]]
dependency_package_paths = ["rust/no-ui/chat"]
setup_packages = [
{ path = "rust/no-ui/chat", run = true }
]
setup_scripts = []
test_package_paths = ["rust/no-ui/chat/test/chat_test"]
test_scripts = []
timeout_secs = 5
fakechain_router = 8545

[[tests.nodes]]
port = 8080
home = "home/first"
fake_node_name = "first.dev"
runtime_verbosity = 2

[[tests.nodes]]
port = 8081
home = "home/second"
fake_node_name = "second.dev"
runtime_verbosity = 2


[[tests]]
dependency_package_paths = []
setup_packages = [
{ path = "rust/no-ui/echo", run = true }
]
setup_scripts = []
test_package_paths = ["rust/no-ui/echo/test/echo_test"]
test_scripts = []
timeout_secs = 5
fakechain_router = 8545

[[tests.nodes]]
port = 8080
home = "home/first"
fake_node_name = "first.dev"
runtime_verbosity = 2


[[tests]]
dependency_package_paths = ["rust/no-ui/fibonacci"]
setup_packages = [
{ path = "rust/no-ui/fibonacci", run = true }
]
setup_scripts = []
test_package_paths = ["rust/no-ui/fibonacci/test/fibonacci_test"]
test_scripts = []
timeout_secs = 5
fakechain_router = 8545

[[tests.nodes]]
port = 8080
home = "home/first"
fake_node_name = "first.dev"
runtime_verbosity = 2


# [[tests]]
# setup_packages = [
# { path = "rust/no-ui/file_transfer", run = true }
# ]
# setup_scripts = []
# test_package_paths = ["rust/no-ui/file_transfer/test/file_transfer_test"]
# test_scripts = []
# timeout_secs = 5
# fakechain_router = 8545
#
# [[tests.nodes]]
# port = 8080
# home = "home/first"
# fake_node_name = "first.dev"
# runtime_verbosity = 2
#
# [[tests.nodes]]
# port = 8081
# home = "home/second"
# fake_node_name = "second.dev"
# runtime_verbosity = 2

0 comments on commit 82806e6

Please sign in to comment.