Skip to content

Commit a1906af

Browse files
authored
Create python-node-ci.yml
Add CI pipeline for Python and Node.js.
1 parent 66f6cca commit a1906af

File tree

1 file changed

+61
-0
lines changed

1 file changed

+61
-0
lines changed
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
name: CI/CD Pipeline
2+
3+
on:
4+
push:
5+
pull_request:
6+
7+
jobs:
8+
python-tests:
9+
name: Python Unit Testing
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install Python dependencies
22+
run: |
23+
python -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
26+
- name: Run Python Unit Tests
27+
run: pytest --junitxml=pytest-results.xml
28+
29+
nodejs-tests:
30+
name: Node.js Unit Testing
31+
runs-on: ubuntu-latest
32+
33+
steps:
34+
- name: Check out code
35+
uses: actions/checkout@v3
36+
37+
- name: Set up Node.js
38+
uses: actions/setup-node@v3
39+
with:
40+
node-version: '16.x'
41+
42+
- name: Install Node.js dependencies
43+
run: npm install
44+
45+
- name: Run Node.js Unit Tests
46+
run: npm test
47+
48+
deploy:
49+
name: Deploy to Staging
50+
needs: [python-tests, nodejs-tests]
51+
runs-on: ubuntu-latest
52+
53+
steps:
54+
- name: Check out code
55+
uses: actions/checkout@v3
56+
57+
- name: Run Deployment Commands
58+
run: |
59+
echo "Starting deployment..."
60+
# Add other deployment commands here
61+
echo "Deployment successful!"

0 commit comments

Comments
 (0)