Skip to content

Update README.md

Update README.md #12

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, '3.10', '3.11']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest pytest-cov flake8
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test application startup
run: |
# Test if the application can start without errors
timeout 10s python app_enhanced.py --test || true
- name: Test cancel transfer functionality
run: |
python test_cancel_transfer.py
security:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Install security tools
run: |
pip install bandit safety
- name: Run security checks with bandit
run: |
bandit -r . -f json -o bandit-report.json || true
- name: Check for known security vulnerabilities
run: |
safety check --json || true
build:
needs: [test, security]
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
- name: Create release archive
run: |
zip -r secure-copy-app-universal-${{ github.sha }}.zip . -x "*.git*" "venv/*" "__pycache__/*" "*.pyc"
- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: secure-copy-app-universal
path: secure-copy-app-universal-${{ github.sha }}.zip