-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitlab-ci.yml
60 lines (54 loc) · 1.38 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
stages:
- build
- test
- deploy
build-job:
stage: build
image: node:20.17-alpine
cache:
paths:
- .frontend/node_modules/
- .frontend/.next/cache/
script:
- echo "Compiling the code..."
- cd frontend
- npm install
- npm run build
- echo "Compile complete."
postman-test-job:
stage: test
image: postman/newman:alpine
script:
- echo "Running Postman tests..."
- newman run PalestineWatch.postman_collection.json
- echo "Postman tests complete."
unit-test-job:
stage: test
image: node:20-alpine
script:
- echo "Running Jest tests..."
- cd frontend # Navigate to the front-end directory
- npm install # Install dependencies
- npm test # Run Jest tests
- echo "Jest tests complete."
selenium-test-job:
stage: test
image: python:3.8
services:
- name: selenium/standalone-chrome:latest
alias: selenium
script:
- echo "Running Selenium tests..."
- pip install selenium webdriver-manager
- python -m unittest discover -s frontend/__test__ -p "acceptance-tests.py" -v
- echo "Selenium tests complete."
api-test-job:
stage: test
image: python:latest
script:
- echo "Installing API test requirements..."
- cd backend
- pip install -r requirements.txt
- echo "Running API tests..."
- PYTHONPATH=.. python -m unit_tests.unit-test
- echo "API tests complete."