Inprove gregor airtable test coverage #4815
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: Unit Tests | |
# Run the test suite on pushes (incl. merges) to master and dev | |
# Run the test suite when a PR is opened, pushed to, or reopened | |
on: | |
push: | |
branches: | |
- master | |
- dev | |
paths-ignore: | |
- 'hail_search/**' | |
- '.github/workflows/hail-search-unit-tests.yaml' | |
pull_request: | |
types: [opened, synchronize, reopened] | |
paths-ignore: | |
- 'hail_search/**' | |
- '.github/workflows/hail-search-unit-tests.yaml' | |
jobs: | |
python: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.9] | |
services: | |
# Label used to access the service container | |
postgres: | |
# Docker Hub image | |
image: postgres | |
# Provide the password for postgres | |
env: | |
POSTGRES_PASSWORD: "pgtest" | |
# Set health checks to wait until postgres has started | |
options: >- | |
--health-cmd pg_isready | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
ports: | |
# Maps tcp port 5432 on service container to the host | |
- 5432:5432 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- uses: actions/setup-java@v1 | |
with: | |
java-version: "8" # The JDK version needed by hail | |
java-package: jdk # (jre, jdk, or jdk+fx) - defaults to jdk | |
architecture: x64 # (x64 or x86) - defaults to x64 | |
- name: Use pip cache | |
uses: actions/cache@v2 | |
with: | |
path: ~/.cache/pip | |
key: pip-${{ hashFiles('**/requirements*.txt') }} | |
restore-keys: | | |
pip- | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip wheel | |
pip install -r requirements.txt | |
pip install -r requirements-dev.txt | |
- name: Run coverage tests | |
run: | | |
coverage run --source="./matchmaker","./seqr","./reference_data","./panelapp" --omit="*/migrations/*","*/apps.py" manage.py test -p '*_tests.py' -v 2 reference_data seqr matchmaker panelapp | |
coverage report --fail-under=99 | |
nodejs: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [14] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
cache-dependency-path: ui/package-lock.json | |
- run: npm install -g [email protected] | |
- run: npm ci | |
working-directory: ./ui | |
- run: npm test | |
working-directory: ./ui |