diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6953014..2753e5d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,18 +20,22 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@v3 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies run: | python -m pip install --upgrade pip - python -m pip install flake8 mypy pylint + python -m pip install flake8 mypy pylint coverage if [ -f requirements.txt ]; then pip install -r requirements.txt; fi + - name: Lint with flake8 run: | flake8 ./tests/*.py ./logic/*.py --max-line-length=120 + - name: Lint with pylint continue-on-error: true run: | @@ -47,6 +51,13 @@ jobs: - name: Type checker with mypy run: | mypy ./tests/*.py ./logic/*.py + - name: Test with python unittest run: | - python -m unittest tests/*.py --verbose + coverage run --omit="*/test*" -m unittest discover --verbose + + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} +