Skip to content

Install application and pre-commit #352

Install application and pre-commit

Install application and pre-commit #352

Workflow file for this run

name: Mesh Info Tests
on: [push]
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install pre-commit
- name: Run pre-commit
run: pre-commit run --all-files
tests:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
services:
postgres:
image: postgres
env:
POSTGRES_PASSWORD: meshmap
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v2
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y librrd-dev
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt -r dev-requirements.txt
pip install -e .
- name: Run flake8
run: flake8 meshinfo tests
- name: Run mypy
run: mypy meshinfo
- name: Run pytest
run: pytest --cov=meshinfo
env:
MESHMAP_COLLECTOR_DATA_DIR: "."
POSTGRES_HOST: localhost
POSTGRES_PASSWORD: meshmap
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y librrd-dev
python -m pip install --upgrade pip setuptools wheel
pip install -r requirements.txt -r dev-requirements.txt
- name: Run Sphinx
run: sphinx-build -W --keep-going -b html docs docs/_build/html