name: Code Quality Pipeline on: pull_request: branches: - main jobs: job: name: Check Code runs-on: ubuntu-latest steps: - name: Checkout Code uses: actions/checkout@v4 - name: Setup Environment uses: https://github.com/actions/setup-python@v5 with: python-version: "3.12" architecture: "x64" - name: Setup poetry env: POETRY_VERSION: 2.1.1 POETRY_HOME: /opt/poetry POETRY_NO_INTERACTION: 1 run: | curl -sSL https://install.python-poetry.org | python3 - export PATH=$POETRY_HOME/bin:$PATH poetry --version - name: Install Dependencies env: POETRY_HOME: /opt/poetry PIP_INDEX_URL: ${{ vars.PIP_INDEX_URL }} PIP_TRUSTED_HOST: ${{ vars.PIP_TRUSTED_HOST }} run: | export PATH=$POETRY_HOME/bin:$PATH poetry install - name: PEP8 Check run: | poetry run flake8 . --benchmark - name: Type Check run: | poetry run mypy . - name: Pytest & Calculate Coverage env: MINIO_ENDPOINT: ${{ vars.MINIO_ENDPOINT }} MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }} MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }} MONGO_ENDPOINT: ${{ vars.MONGO_ENDPOINT }} run: | poetry run coverage run -m pytest . - name: Coverage Report run: | poetry run coverage report -m