mirror of
https://gitlab.rlp.net/proj-wise2526-video2document/video2document.git
synced 2026-06-15 18:01:52 +02:00
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:
+14
-25
@@ -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
@@ -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",
|
||||||
|
|||||||
@@ -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
|
|
||||||
@@ -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")
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user