Skip to content

docs: fix ci status badger #3

docs: fix ci status badger

docs: fix ci status badger #3

name: code-quality
on:
push:
jobs:
pylint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
with:
path: ~/.poetry
key: ${{ matrix.os }}-poetry
- name: Install latest version of Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.python-poetry.org | python -
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Cache dependencies
id: cache-deps
uses: actions/[email protected]
with:
path: ${{github.workspace}}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Analysing the code with pylint
run: poetry run pylint bot
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ "3.13" ]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Cache Poetry
id: cache-poetry
uses: actions/[email protected]
with:
path: ~/.poetry
key: ${{ matrix.os }}-poetry
- name: Install latest version of Poetry
if: steps.cache-poetry.outputs.cache-hit != 'true'
run: |
curl -sSL https://install.python-poetry.org | python -
- name: Add Poetry to $PATH
run: |
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
- name: Get Poetry version
run: poetry --version
- name: Check pyproject.toml validity
run: poetry check --no-interaction
- name: Cache dependencies
id: cache-deps
uses: actions/[email protected]
with:
path: ${{github.workspace}}/.venv
key: ${{ matrix.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: ${{ matrix.os }}-
- name: Install deps
if: steps.cache-deps.cache-hit != 'true'
run: |
poetry config virtualenvs.in-project true
poetry install --no-interaction
- name: Test with pytest
run: |
poetry run pytest -v --cov=bot