Skip to content

fix: resolve all linting, formatting, and type checking issues #25

fix: resolve all linting, formatting, and type checking issues

fix: resolve all linting, formatting, and type checking issues #25

Workflow file for this run

name: CI
on:
push:
branches: [ main, develop ]
pull_request:
branches: [ main ]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v4
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.txt
pip install pytest pytest-cov
- name: Run tests with coverage
run: |
python -m pytest tests/ -v --cov=shellrosetta --cov-report=xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage.xml
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 black mypy
pip install -r requirements.txt
- name: Run flake8
run: flake8 shellrosetta/ tests/ --max-line-length=88 --ignore=E501,W293,W291,W292,E302,E305,F401,F841
- name: Run black
run: black --check shellrosetta/ tests/
- name: Run mypy
run: mypy shellrosetta/ --ignore-missing-imports