ci(pytest
): add test coverage reporting
#5
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: CI | |
on: [push, pull_request] | |
jobs: | |
ruff: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: ruff | |
run: docker compose -f docker-compose.dev.yml run pixel-battle ruff check src tests -n | |
mypy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: mypy | |
run: docker compose -f docker-compose.dev.yml run pixel-battle mypy src | |
pytest: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: start all docker compose services | |
run: docker compose -f docker-compose.dev.yml up -d | |
- name: create redis cluster | |
run: docker exec -it pixel-battle-redis1 ash /mnt/create-cluster.sh | |
- name: pytest | |
run: docker compose -f docker-compose.dev.yml run pixel-battle pytest tests --cov --cov-branch | |
- name: upload coverage to codecov | |
uses: codecov/codecov-action@v2 |