Skip to content

Update test_folder_operations.py #31

Update test_folder_operations.py

Update test_folder_operations.py #31

Workflow file for this run

name: Unit Tests
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache Python dependencies
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install Dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements.txt
- name: Install Coverage and Pytest
run: |
python -m pip install coverage
python -m pip install pytest
python -m pip install pytest-html
- name: Create Coverage Directory
run: mkdir -p coverage
- name: Run Tests with Coverage
run: |
coverage run -m pytest --html=report.html
- name: Run Tests and Collect Coverage
run: |
COVERAGE_FILE=coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}
CONTEXT=${{ runner.os }}-py${{ matrix.python-version }}
coverage run -m pytest --html=report.html
- name: Store Coverage Files
if: always()
uses: actions/upload-artifact@v3
with:
name: python-coverage-${{ matrix.python-version }}
path: coverage
- name: Store HTML Report
if: always()
uses: actions/upload-artifact@v2
with:
name: html-report
path: report.html