-
Notifications
You must be signed in to change notification settings - Fork 89
93 lines (86 loc) · 2.72 KB
/
unit-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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/**'
- 'vlm/**'
- '.github/workflows/hail-search-unit-tests.yaml'
pull_request:
types: [opened, synchronize, reopened]
paths-ignore:
- 'hail_search/**'
- 'vlm/**'
- '.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