Skip to content
Draft
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
34 changes: 34 additions & 0 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Run test suite

on:
push:
branches: [main, test/gh-actions-run-test-suite] # TODO: remove test branch!

jobs:
run_test_suite:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Install top level dependencies
run: |
npm ci

- name: Transpile the types package
run: |
cd types
npm ci
npm run tsc

# - name: Run the test suite
# run: npm run full-test-suite

- name: Create results index and publish
run: |
npm run tsc
npm run index-results
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npm run publish-results -- -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 8 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,30 @@
"scripts": {
"dev": "tsc -w",
"tsc": "tsc",
"publish-results": "node results/createResultsIndex.js && gh-pages -d results -b results -a",
"index-results": "node results/createResultsIndex.js",
"publish-results": "gh-pages -d results -b results -a",
"sync-data": "mkdir -p visualization-ui/src/data && rm -f visualization-ui/src/data/* && cp results/*.publish.json visualization-ui/src/data",
"cli": "npm run tsc && node cli.js",
"full-test-suite": "npm run tsc && node runTestSuite.js",
"test:benchmark": "docker compose -f ./ipc-methods/benchmark/docker-compose.yml up",
"test:benchmark": "docker-compose -f ./ipc-methods/benchmark/docker-compose.yml up",
"test:benchmark:raw": "npm run tsc && node --max-old-space-size=1536 ./ipc-methods/benchmark/main.js",
"test:unix-socket": "docker compose -f ./ipc-methods/unix-socket/docker-compose.yml up",
"test:unix-socket": "docker-compose -f ./ipc-methods/unix-socket/docker-compose.yml up",
"test:unix-socket:server": "THE_OPERATION_SOCKET_PATH=/tmp/unix-socket node --max-old-space-size=1536 ./ipc-methods/unix-socket/server.js",
"test:unix-socket:main": "THE_OPERATION_SOCKET_PATH=/tmp/unix-socket node --max-old-space-size=1536 ./ipc-methods/unix-socket/main.js",
"test:unix-socket:raw": "unlink /tmp/unix-socket && npm run tsc && concurrently \"npm run test:unix-socket:server\" \"npm run test:unix-socket:main\"",
"test:tcp": "docker compose -f ./ipc-methods/tcp/docker-compose.yml up",
"test:tcp": "docker-compose -f ./ipc-methods/tcp/docker-compose.yml up",
"test:tcp:server": "node --max-old-space-size=1536 ./ipc-methods/tcp/server.js",
"test:tcp:main": "THE_OPERATION_ENDPOINT_HOSTNAME=localhost THE_OPERATION_ENDPOINT_PORT=3000 node --max-old-space-size=1536 ./ipc-methods/tcp/main.js",
"test:tcp:raw": "npm run tsc && concurrently \"npm run test:tcp:server\" \"npm run test:tcp:main\"",
"test:http": "docker compose -f ./ipc-methods/http/docker-compose.yml up",
"test:http": "docker-compose -f ./ipc-methods/http/docker-compose.yml up",
"test:http:server": "node --max-old-space-size=1536 ./ipc-methods/http/server.js",
"test:http:main": "THE_OPERATION_ENDPOINT_HOSTNAME=localhost THE_OPERATION_ENDPOINT_PORT=3000 node --max-old-space-size=1536 ./ipc-methods/http/main.js",
"test:http:raw": "npm run tsc && concurrently \"npm run test:http:server\" \"npm run test:http:main\"",
"test:http-express-axios": "docker compose -f ./ipc-methods/http-express-axios/docker-compose.yml up",
"test:http-express-axios": "docker-compose -f ./ipc-methods/http-express-axios/docker-compose.yml up",
"test:http-express-axios:server": "node --max-old-space-size=1536 ./ipc-methods/http-express-axios/server.js",
"test:http-express-axios:main": "THE_OPERATION_ENDPOINT_HOSTNAME=localhost THE_OPERATION_ENDPOINT_PORT=3000 node --max-old-space-size=1536 ./ipc-methods/http-express-axios/main.js",
"test:http-express-axios:raw": "npm run tsc && concurrently \"npm run test:http-express-axios:server\" \"npm run test:http-express-axios:main\"",
"test:https": "docker compose -f ./ipc-methods/https/docker-compose.yml up",
"test:https": "docker-compose -f ./ipc-methods/https/docker-compose.yml up",
"test:https:server": "KEY_PATH=./ipc-methods/https/localhost.pem CERT_PATH=./ipc-methods/https/localhost-cert.pem node --max-old-space-size=1536 ./ipc-methods/https/server.js",
"test:https:main": "CERT_PATH=./ipc-methods/https/localhost-cert.pem THE_OPERATION_ENDPOINT_HOSTNAME=localhost THE_OPERATION_ENDPOINT_PORT=3000 node --max-old-space-size=1536 ./ipc-methods/https/main.js",
"test:https:raw": "npm run tsc && concurrently \"npm run test:https:server\" \"npm run test:https:main\"",
Expand Down
3 changes: 2 additions & 1 deletion results/createResultsIndex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ const createResultsIndex = async () => {
try {
const files = await fs.promises.readdir(path.join('results'));

const analyzedFiles = files.filter(file => /.analyzed.json/.test(file));
// const analyzedFiles = files.filter(file => /.analyzed.json/.test(file));
const analyzedFiles = files; // FIXME: change when on-the-fly analysis is implemented

fs.writeFileSync(
path.join('results', 'index.json'),
Expand Down