Skip to content

Add github-actions yml #4

Add github-actions yml

Add github-actions yml #4

Workflow file for this run

name: CI
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-24.04
env:
SECRET_KEY: "super-secret-key-for-ci"
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements-dev.txt
- name: Lint with Ruff
run: |
ruff check .
continue-on-error: false
- name: Type check with mypy
run: |
rm -rf .mypy_cache
mypy .
- name: Run tests with coverage
run: |
coverage run -m pytest
coverage report -m
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3