File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : CI/CD Pipeline
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ pull_request :
8
+ branches :
9
+ - main
10
+
11
+ jobs :
12
+ build-and-test :
13
+ runs-on : ubuntu-latest
14
+ strategy :
15
+ matrix :
16
+ service :
17
+ - Hate_Speech
18
+ - Click-Bait
19
+ - Security-Header
20
+ - SSL
21
+ - FakeNewsAPI
22
+ - ImageAPI
23
+ - News_Origin
24
+ - ReportAPI
25
+
26
+ steps :
27
+ - name : Checkout code
28
+ uses : actions/checkout@v3
29
+
30
+ - name : Set up Python
31
+ uses : actions/setup-python@v4
32
+ with :
33
+ python-version : 3.10
34
+
35
+ - name : Build Docker image for ${{ matrix.service }}
36
+ run : |
37
+ docker build -t ${{ matrix.service }} ./server/${{ matrix.service }}
38
+
39
+ - name : Run Pytest inside Docker container
40
+ run : |
41
+ docker run --rm ${{ matrix.service }} pytest
42
+
43
+ deploy :
44
+ needs : build-and-test
45
+ runs-on : ubuntu-latest
46
+ steps :
47
+ - name : Deploy Docker images (Placeholder)
48
+ run : echo "Deploying Docker images"
You can’t perform that action at this time.
0 commit comments