implemented first CI pipeline version with a test test that only checks if 1 is 1, needs implementation of actual tests

This commit is contained in:
2025-12-09 17:56:59 +01:00
parent 882b49a489
commit 8c201db539
6 changed files with 26 additions and 35 deletions
+14 -25
View File
@@ -1,33 +1,22 @@
workflow: image: node:latest
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
stages: stages:
- setup - install
- test - test
setup_environment: job-install:
stage: setup stage: install
script: script:
- pip install --upgrade pip - npm install
- pip install -r requirements.txt artifacts:
- echo "Dependencies installed successfully." untracked: false
when: on_success
access: all
expire_in: "30 days"
paths:
- node_modules
only: job-test:
- main
- feature/ci-pipeline-s1-09a-1 # You can add more branches if needed
test_app:
stage: test stage: test
script: script:
- echo "Running V2D Framework basic test..." - npm test
- python -m unittest discover || echo "No tests found."
only:
- main
- feature/ci-pipeline-s1-09a-1
+3 -2
View File
@@ -8,7 +8,8 @@
"electron": "^39.1.1", "electron": "^39.1.1",
"express": "^5.1.0", "express": "^5.1.0",
"ffmpeg-static": "^5.2.0", "ffmpeg-static": "^5.2.0",
"fluent-ffmpeg": "^2.1.3" "fluent-ffmpeg": "^2.1.3",
"mocha": "^11.7.5"
}, },
"devDependencies": { "devDependencies": {
"@types/cli-progress": "^3.11.6", "@types/cli-progress": "^3.11.6",
@@ -27,7 +28,7 @@
}, },
"scripts": { "scripts": {
"start": "electron main.js", "start": "electron main.js",
"test": "echo \"Error: no test specified\" && exit 1" "test": "mocha ./test/unit/test.js"
}, },
"repository": { "repository": {
"type": "git", "type": "git",
View File
-8
View File
@@ -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
View File
+9
View File
@@ -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")
}
});
});