Skip to content

Commit

Permalink
Merge pull request #47 from oceanprotocol/tests
Browse files Browse the repository at this point in the history
vs code tests
  • Loading branch information
jamiehewitt15 authored Feb 17, 2025
2 parents 3e45e06 + 7cdebac commit 9d63d61
Show file tree
Hide file tree
Showing 21 changed files with 462 additions and 1,145 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests

on:
pull_request:
branches: [main]
push:
branches: [main]

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20'
cache: 'npm'

- name: Install dependencies
run: npm ci

- name: Install VS Code
run: |
curl -L "https://update.code.visualstudio.com/latest/linux-x64/stable" -o vscode.tar.gz
tar -xf vscode.tar.gz
- name: Run tests
run: xvfb-run -a npm test
env:
DISPLAY: ':99.0'
7 changes: 7 additions & 0 deletions .mocharc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"extension": ["ts"],
"spec": "src/test/**/*.test.ts",
"timeout": 20000,
"require": "ts-node/register",
"exit": true
}
14 changes: 0 additions & 14 deletions metadata/freeComputeAlgoJS-2.json

This file was deleted.

14 changes: 0 additions & 14 deletions metadata/freeComputeAlgoJS-3.json

This file was deleted.

14 changes: 0 additions & 14 deletions metadata/freeComputeAlgoJS.json

This file was deleted.

18 changes: 0 additions & 18 deletions metadata/freeComputeAlgoPY.json

This file was deleted.

7 changes: 0 additions & 7 deletions metadata/freeComputeDataset.json

This file was deleted.

137 changes: 128 additions & 9 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
{
"name": "ocean-protocol",
"publisher": "ocean-protocol",
"displayName": "ocean-protocol",
"description": "Easily publish assets and test your algorithms with the Ocean Protocol vscode extension.",
"version": "0.0.1",
Expand Down Expand Up @@ -49,14 +50,16 @@
"watch-tests": "tsc -p . -w --outDir out",
"lint": "eslint src",
"test-vs": "vscode-test",
"test": "npm run mocha 'test/publish.test.ts'",
"mocha": "TS_NODE_PROJECT='./test/tsconfig.json' mocha --extensions ts --config=test/.mocharc.json --node-env=test --exit"
"test": "vscode-test --extensionDevelopmentPath=. --extensionTestsPath=out/test/extension.test.js",
"pretest": "npm run compile-tests",
"posttest": "npm run lint"
},
"devDependencies": {
"@types/chai": "^5.0.0",
"@types/mocha": "^10.0.1",
"@types/mocha": "^10.0.10",
"@types/node": "20.x",
"@types/vscode": "^1.93.0",
"@types/sinon": "^17.0.3",
"@types/vscode": "^1.96.0",
"@typescript-eslint/eslint-plugin": "^8.3.0",
"@typescript-eslint/parser": "^8.3.0",
"@vscode/test-cli": "^0.0.10",
Expand All @@ -65,8 +68,9 @@
"eslint": "^9.9.1",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-prettier": "^5.2.1",
"mocha": "^10.2.0",
"mocha": "^10.3.0",
"prettier": "^3.3.3",
"sinon": "^17.0.1",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.1",
"typescript": "^5.6.2",
Expand Down
Loading

0 comments on commit 9d63d61

Please sign in to comment.