-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (31 loc) · 1.03 KB
/
test.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
name: Github Actions Test
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.12"]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install -r requirements.txt
- name: Test with pytest
run: |
pytest
- name: Compare moh_template.csv
shell: bash {0}
run: |
python generate_schema.py
diff template.csv moh_template.csv > curr_diff.txt
bytes=$(head -5 curr_diff.txt | wc -c)
dd if=curr_diff.txt bs="$bytes" skip=1 conv=notrunc of=new_diff.txt
diff new_diff.txt test_data/moh_diffs.txt
if [[ $? == 1 ]]; then echo MoH template checking needs to be updated! See https://github.com/CanDIG/clinical_ETL_code#mapping-template for information.
exit 1
fi