Skip to content

Merge pull request #4 from khasbilegt/update-readme #12

Merge pull request #4 from khasbilegt/update-readme

Merge pull request #4 from khasbilegt/update-readme #12

Workflow file for this run

name: Package QA
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v3
with:
path: ~/.local
key: poetry-0
- name: Install and configure Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Run Ruff Linter
run: poetry run ruff check --output-format=github .
- name: Run Ruff Formatter
run: poetry run ruff format --check .
- name: Run mypy
run: poetry run mypy qpay
- name: Run tests
run: poetry run pytest --cov=. --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
slug: khasbilegt/qpay-python
file: ./coverage.xml
fail_ci_if_error: true