Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add fast multidimensional interop tests #97

Merged
merged 21 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/workflows/multidim-interop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
on:
workflow_dispatch:
pull_request:

name: libp2p multidimensional interop test

jobs:
run-multidim-interop:
uses: "./.github/workflows/run-testplans.yml"
with:
dir: "multidim-interop"
72 changes: 72 additions & 0 deletions .github/workflows/run-testplans.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Run composition file with a custom git reference

on:
workflow_call:
inputs:
dir:
description: the directory with the testplans test
required: true
type: string
jobs:
run_test:
name: Run testplans test
runs-on: ubuntu-latest
env:
TEST_PLAN_DIR: ${{ inputs.dir }}
defaults:
run:
shell: bash
steps:
- name: Checkout sources
uses: actions/checkout@v2
with:
path: test-plans
repository: ${{ env.TEST_PLAN_REPO }}
ref: ${{ env.TEST_PLAN_BRANCH }}
- uses: actions/setup-node@v3
with:
node-version: 17
cache: 'npm'
cache-dependency-path: ./test-plans/${{ env.TEST_PLAN_DIR }}/package-lock.json
- name: Expose GitHub Runtime # Needed for docker buildx to cache properly (See https://docs.docker.com/build/cache/backends/gha/#authentication)
uses: crazy-max/ghaction-github-runtime@v2
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Install deps
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: npm ci
- name: Build images
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: make
- name: List docker images
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: docker image ls
- name: Run the test
timeout-minutes: 120
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: WORKER_COUNT=2 npm run test
- name: Print the results
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: cat results.csv
- name: Render results
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: npm run renderResults > ./dashboard.md
- name: Show Dashboard Output
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: cat ./dashboard.md >> $GITHUB_STEP_SUMMARY
- name: Exit with Error
working-directory: ./test-plans/${{ env.TEST_PLAN_DIR }}/
run: |
if grep -q ":red_circle:" ./dashboard.md; then
exit 1
else
exit 0
fi
- uses: actions/upload-artifact@v3
if: ${{ always() }}
with:
name: testground-output
path: |
./test-plans/${{ env.TEST_PLAN_DIR }}/results.csv
./test-plans/${{ env.TEST_PLAN_DIR }}/dashboard.md
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,7 @@ __pycache__/
.history

# End of https://www.gitignore.io/api/go,visualstudiocode

### NodeJS

node_modules
6 changes: 6 additions & 0 deletions multidim-interop/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# For now, not committing image.json files
image.json

results.csv
# Logs from testground
*.tgz
13 changes: 13 additions & 0 deletions multidim-interop/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
GO_SUBDIRS := $(wildcard go/*/.)
JS_SUBDIRS := $(wildcard js/*/.)

all: $(GO_SUBDIRS) $(JS_SUBDIRS) rust/.
$(JS_SUBDIRS):
$(MAKE) -C $@
$(GO_SUBDIRS):
$(MAKE) -C $@
rust/.:
$(MAKE) -C $@


.PHONY: $(GO_SUBDIRS) $(JS_SUBDIRS) rust/. all
Loading