Skip to content

Merge pull request #12 from nyu-devops/dependabot/pip/black-24.3.0 #25

Merge pull request #12 from nyu-devops/dependabot/pip/black-24.3.0

Merge pull request #12 from nyu-devops/dependabot/pip/black-24.3.0 #25

Workflow file for this run

name: CI Build
on:
push:
branches:
- master
paths-ignore:
- 'README.md'
pull_request:
branches:
- master
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
container: python:3.11-slim
# Required services
services:
redis:
image: redis:6-alpine
ports:
- 6379:6379
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip poetry
poetry config virtualenvs.create false
poetry install
- name: Linting
run: |
flake8 service --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 service --count --max-complexity=10 --max-line-length=127 --statistics
pylint service --max-line-length=127
- name: Run unit tests with PyTest
run: pytest --pspec --cov=service --cov-fail-under=95
env:
DATABASE_URI: "redis://redis:6379"
- name: Upload code coverage
uses: codecov/[email protected]