public-law/new-dale-chall-readability

View on GitHub
.github/workflows/python-app.yml

Summary

Maintainability
Test Coverage
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: Tests and type-checks

on: push

jobs:
  Testing:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Install poetry
        run: pipx install poetry

      - name: Set up Python
        uses: actions/setup-python@v3
        with:
          python-version: "3.10.6"
          # cache: 'poetry'

      - name: Install dependencies
        run: |
          poetry env use "3.10.6"
          poetry install --no-interaction

      - name: Test with Pytest
        run: |
          poetry run pytest

  Type-Checking:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v3

      - name: Install poetry
        run: pipx install poetry

      - name: Set up Python 3.10
        uses: actions/setup-python@v3
        with:
          python-version: "3.10.6"
          # cache: 'poetry'

      - name: Install dependencies
        run: |
          poetry env use "3.10.6"
          poetry install --no-interaction

      - name: Type-check with Pyright
        run: poetry run pyright