diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 5bebd17..326105c 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,33 +1,22 @@ -workflow: - rules: - # Run the pipeline for merge requests or when committing to a branch - - if: $CI_PIPELINE_SOURCE == "merge_request_event" - - if: $CI_COMMIT_BRANCH - -image: python:3.14.0 +image: node:latest stages: - - setup + - install - test -setup_environment: - stage: setup +job-install: + stage: install script: - - pip install --upgrade pip - - pip install -r requirements.txt - - echo "Dependencies installed successfully." + - npm install + artifacts: + untracked: false + when: on_success + access: all + expire_in: "30 days" + paths: + - node_modules - only: - - main - - feature/ci-pipeline-s1-09a-1 # You can add more branches if needed - -test_app: +job-test: stage: test script: - - echo "Running V2D Framework basic test..." - - python -m unittest discover || echo "No tests found." - - only: - - main - - feature/ci-pipeline-s1-09a-1 - + - npm test \ No newline at end of file diff --git a/package.json b/package.json index 4b6cc7b..4f3f93e 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,8 @@ "electron": "^39.1.1", "express": "^5.1.0", "ffmpeg-static": "^5.2.0", - "fluent-ffmpeg": "^2.1.3" + "fluent-ffmpeg": "^2.1.3", + "mocha": "^11.7.5" }, "devDependencies": { "@types/cli-progress": "^3.11.6", @@ -27,7 +28,7 @@ }, "scripts": { "start": "electron main.js", - "test": "echo \"Error: no test specified\" && exit 1" + "test": "mocha ./test/unit/test.js" }, "repository": { "type": "git", diff --git a/test/.gitkeep b/test/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/test_health.py b/test/test_health.py deleted file mode 100644 index 7b088a7..0000000 --- a/test/test_health.py +++ /dev/null @@ -1,8 +0,0 @@ -from fastapi.testclient import TestClient -from app.main import app - -client = TestClient(app) - -def test_health(): - response = client.get("/health") - assert response.status_code == 200 diff --git a/test/unit/.gitkeep b/test/unit/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/test/unit/test.js b/test/unit/test.js new file mode 100644 index 0000000..1ab562a --- /dev/null +++ b/test/unit/test.js @@ -0,0 +1,9 @@ +describe('Just a little test', () => { + it('1 should be 1', (done) => { + if(1 == 1){ + done() + }else{ + throw Error("something went terribly wrong") + } + }); +}); \ No newline at end of file