Merge pull request #26 from nyu-devops/dependabot/pip/certifi-2024.7.4 #48
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Build | |
on: | |
push: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- '.vscode/**' | |
pull_request: | |
branches: | |
- master | |
paths-ignore: | |
- 'README.md' | |
- '.vscode/**' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: python:3.11-slim | |
services: | |
couchdb: | |
image: couchdb:latest | |
ports: | |
- 5984:5984 | |
env: | |
COUCHDB_USER: admin | |
COUCHDB_PASSWORD: pass | |
options: >- | |
--health-cmd "curl -X GET http://couchdb:5984/" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
python -m pip install -U pip poetry | |
poetry config virtualenvs.create false | |
poetry install | |
- name: Create the test database | |
run: | | |
apt-get update | |
apt-get install -y curl | |
curl -X PUT http://admin:pass@couchdb:5984/test | |
- name: Run unit tests with pytest | |
run: pytest --pspec --cov=service --cov-fail-under=95 --disable-warnings | |
env: | |
FLASK_APP: "wsgi:app" | |
BINDING_CLOUDANT: '{"username":"admin","password":"pass","host":"couchdb","port":5984,"url":"http://admin:pass@couchdb:5984"}' | |
- name: Upload code coverage | |
uses: codecov/[email protected] | |