Skip to content

Commit f8a4fa2

Browse files
authored
Create integration-tests.yml
Add integration tests for AI Object Recognition Project.
1 parent a1906af commit f8a4fa2

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Integration Tests
2+
3+
on:
4+
push: # Triggers on any push to any branch
5+
pull_request: # Triggers on any pull request to any branch
6+
7+
jobs:
8+
integration-tests:
9+
name: Run Integration Tests
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v3
15+
16+
# Set up Python environment if Python-based integration tests are required
17+
- name: Set up Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: '3.x'
21+
22+
- name: Install Python dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install -r requirements.txt
26+
27+
# Set up Node.js environment if Node.js-based integration tests are required
28+
- name: Set up Node.js
29+
uses: actions/setup-node@v3
30+
with:
31+
node-version: '16.x'
32+
33+
- name: Install Node.js dependencies
34+
run: npm install
35+
36+
# Run Integration Tests
37+
- name: Run Integration Tests
38+
run: |
39+
# Run Python integration tests if any (example command)
40+
pytest tests/integration --junitxml=integration-test-results.xml || echo "No Python integration tests found."
41+
42+
# Run Node.js integration tests if any (example command)
43+
npm run test:integration || echo "No Node.js integration tests found."
44+
45+
# Optionally, upload integration test results
46+
- name: Upload Test Results
47+
uses: actions/upload-artifact@v3
48+
with:
49+
name: integration-test-results
50+
path: integration-test-results.xml # Adjust path based on output files

0 commit comments

Comments
 (0)