Skip to content

Refactor code and enhance maintainability. #36

Refactor code and enhance maintainability.

Refactor code and enhance maintainability. #36

Workflow file for this run

name: BlockScore CI/CD
on:
push:
branches: [ main, master, develop ]
pull_request:
branches: [ main, master, develop ]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f code/requirements.txt ]; then pip install -r code/requirements.txt; fi
- name: Run tests
run: |
cd code
python -m pytest
build-and-deploy:
needs: [test]
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f code/requirements.txt ]; then pip install -r code/requirements.txt; fi
# Add deployment steps here based on your deployment strategy