Canstralian commited on
Commit
36b3584
·
verified ·
1 Parent(s): 444a646

Create .github/workflows/cd.yml

Browse files
Files changed (1) hide show
  1. .github/workflows/cd.yml +41 -0
.github/workflows/cd.yml ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: CI Pipeline
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ test:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - name: Checkout code
17
+ uses: actions/checkout@v3
18
+
19
+ - name: Set up Python
20
+ uses: actions/setup-python@v4
21
+ with:
22
+ python-version: "3.10" # Match your project's Python version
23
+
24
+ - name: Install dependencies
25
+ run: |
26
+ python -m pip install --upgrade pip
27
+ pip install -r requirements.txt
28
+
29
+ - name: Lint and Test Code
30
+ run: |
31
+ python -m compileall app.py # Check for syntax errors
32
+ # Add additional test commands if applicable
33
+
34
+ - name: Launch Gradio App (Validation)
35
+ run: |
36
+ python app.py &
37
+ sleep 10 # Wait for the app to initialize
38
+ curl -f http://127.0.0.1:7860 || exit 1 # Ensure the app runs successfully
39
+
40
+ - name: Check for dependency updates
41
+ run: pip list --outdated