Skip to content

Commit

Permalink
Merge pull request #1 from AstuteVisionDL/health_check
Browse files Browse the repository at this point in the history
Health check
  • Loading branch information
Daniil-Solo authored Nov 22, 2023
2 parents c653227 + a437198 commit fb2a1a9
Show file tree
Hide file tree
Showing 13 changed files with 834 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Linters checking
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: "Setup python"
uses: actions/setup-python@v2
with:
python-version: 3.10.0

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install

- name: Run linters
run: make lint
33 changes: 33 additions & 0 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Tests checking
on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-20.04

steps:
- name: Checkout
uses: actions/checkout@v2

- name: "Setup python"
uses: actions/setup-python@v2
with:
python-version: 3.10.0

- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true

- name: Install dependencies
run: poetry install

- name: Run tests
run: make test
33 changes: 33 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
VENV := .venv

PROJECT := src
TESTS := tests

# Prepare

.venv:
poetry install --no-root
poetry check

setup: .venv

# Lint

black: .venv
poetry run black --check --diff $(PROJECT)

flake: .venv
poetry run flake8 $(PROJECT)

pylint: .venv
poetry run pylint $(PROJECT)

lint: black flake pylint


# Test

pytest: .venv
poetry run pytest $(TESTS)

test: pytest
Loading

0 comments on commit fb2a1a9

Please sign in to comment.