Merge branch 'stable' of https://github.com/uc-cdis/requestor into st… #188
Workflow file for this run
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: Run tests | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
services: | |
postgres: | |
image: postgres:9.6 | |
env: | |
POSTGRES_USER: postgres | |
POSTGRES_PASSWORD: postgres | |
POSTGRES_DB: requestor_test | |
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 | |
- name: Test with pytest | |
run: | | |
poetry run pytest -vv tests --cov=src --cov=migrations/versions --cov-report xml | |
- name: Submit coverage report | |
env: | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | |
run: | | |
pip install coveralls | |
coveralls |