Skip to content

fix: use short text in dashboard view #12

fix: use short text in dashboard view

fix: use short text in dashboard view #12

Workflow file for this run

name: Code Quality
on:
workflow_dispatch:
pull_request:
types:
- opened
- synchronize
- reopened
push:
branches:
- master
- develop
jobs:
cache:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
id: cached-poetry
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install Poetry
if: steps.cached-poetry.outputs.cache-hit != 'true'
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached Poetry venv
id: cached-poetry-venv
uses: actions/cache@v4
with:
path: .venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install dependencies
if: steps.cached-poetry-venv.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Install package
run: poetry install --no-interaction
ruff:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install package
run: |
poetry install --no-interaction
- name: Run ruff
run: |
poetry run ruff check inky_phat_dashboard
mypy:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install package
run: |
poetry install --no-interaction
- name: Run mypy
run: |
poetry run mypy inky_phat_dashboard
tests:
needs: cache
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.11"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Load cached Poetry installation
uses: actions/cache@v4
with:
path: ~/.local
key: poetry-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Load cached Poetry venv
uses: actions/cache@v4
with:
path: ~/.venv
key: poetry-venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}-${{ matrix.python-version }}
- name: Install package
run: |
poetry install --no-interaction
- name: Run tests
run: |
poetry run pytest --cov=inky_phat_dashboard --cov-report=xml --cov-report=term tests