Skip to content

Merge branch 'stable' of https://github.com/uc-cdis/metadata-service … #1072

Merge branch 'stable' of https://github.com/uc-cdis/metadata-service …

Merge branch 'stable' of https://github.com/uc-cdis/metadata-service … #1072

Workflow file for this run

name: CI Workflow
on: [push]
jobs:
test:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:9.6
env:
POSTGRES_USER: metadata_user
POSTGRES_PASSWORD: metadata_pass
POSTGRES_DB: test_metadata
ports:
- 5432:5432
options: --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5
steps:
- uses: actions/checkout@v1
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- uses: actions/cache@preview
with:
path: ~/.cache/pypoetry/virtualenvs
key: ${{ runner.os }}-poetry-${{ hashFiles(format('{0}{1}', github.workspace, '/poetry.lock')) }}
restore-keys: |
${{ runner.os }}-poetry-
- name: Install dependencies
run: |
pip install poetry
poetry install -vv --no-interaction
poetry show -vv
- name: Test with pytest
env:
DB_HOST: localhost
DB_PORT: 5432
DB_USER: metadata_user
DB_PASSWORD: metadata_pass
PGPASSWORD: metadata_pass
run: |
poetry run pytest --cov=src --cov=migrations/versions --cov-fail-under=94 --cov-report xml
- name: Submit coverage report
if: github.ref == 'refs/heads/master'
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }}
run: |
pip install coveralls
coveralls