Skip to content

Testing

Testing #220

Workflow file for this run

# This workflow will install Python dependencies, run tests, run linting, and test building docs
name: Testing
on:
pull_request:
branches:
- main
workflow_dispatch: # For on demand runs
schedule:
- cron: 0 0 * * * # Scheduled run every day at midnight
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Set up Python 3.12 to match the version of Python used in AWS Lambda
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install -r requirements.dev.txt
- name: Run tests
run: |
pytest --pyargs lambda_function/tests --cov=lambda_function/src --cov-report=html
# Upload coverage reports to Codecov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}