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:
|
||||
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
|
||||
+3
-2
@@ -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",
|
||||
|
||||
@@ -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