sylvchev/mdla

View on GitHub
.github/workflows/test_lint.yml

Summary

Maintainability
Test Coverage
name: Test-and-Lint

on:
  push:
    branches: [master]
  pull_request:
    branches: [master]

jobs:
  test-and-lint:
    name: test-py-${{ matrix.python_version }}
    runs-on: ubuntu-latest
    strategy:
      fail-fast: true
      matrix:
        python_version: [3.9]

    steps:
      - uses: actions/checkout@v4

      - name: "Setup Python"
        uses: actions/setup-python@v4
        with:
          python-version: ${{ matrix.python_version }}

      - uses: pre-commit/action@v3.0.0

      - name: Install Poetry
        uses: snok/install-poetry@v1
        with:
          virtualenvs-create: true
          virtualenvs-in-project: true

      - name: Install MDLA
        run: poetry install --no-interaction --with dev

      - name: "Run tests"
        shell: bash
        run: |
          poetry run pytest --cov=./ --cov-report=xml

      - name: "Coverage"
        uses: codecov/codecov-action@v3
        with:
          files: ./coverage.xml
          flags: unittests
          name: codecov-umbrella
          verbose: true