Update ci.yml #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Pipeline for my addnumapp App | |
on: | |
push: | |
branches: | |
- main # Trigger on pushes to main branch | |
pull_request: | |
branches: | |
- main # Trigger on pull requests to main branch | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
# Check out the code | |
- name: Checkout Code | |
uses: actions/checkout@v3 | |
# Set up Python environment | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
# Install dependencies | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt | |
# Run tests | |
- name: Run Tests | |
run: pytest # Replace with your test framework or script | |
# Optional: Linting (e.g., Flake8) | |
- name: Run Linter | |
run: pip install flake8 && flake8 . | |