Skip to content

Merge pull request #19 from nyu-devops/updates-sp24 #86

Merge pull request #19 from nyu-devops/updates-sp24

Merge pull request #19 from nyu-devops/updates-sp24 #86

Workflow file for this run

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