Skip to content

change main to master #1

change main to master

change main to master #1

name: CI/CD Pipeline
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11' # Change to your project's Python version
- name: Install Dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt # Ensure you have a requirements file
- name: Run Tests
run: |
pytest tests/ --junitxml=report.xml # Use appropriate test framework
- name: Upload Test Results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: report.xml
deploy:
needs: build-and-test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' # Deploy only from main branch
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Deploy Application
run: |
echo "Deploying application..."
# Add your deployment commands here, e.g., uploading files, running scripts