Another attempt #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- 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 -r requirements.txt | |
pip install pytest pytest-asyncio pytest-cov black flake8 autoflake | |
- name: Create config file | |
run: | | |
cp config.yml.example config.yml | |
- name: Check code style | |
run: | | |
# Check for unused imports | |
autoflake --check --remove-all-unused-imports --recursive . | |
# Check formatting | |
black --check . | |
# Run linter | |
flake8 . | |
- name: Run tests | |
run: | | |
pytest tests/ -v --cov=src |