github workflow corrected. #596
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: 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 to moh_v3_template.csv | |
shell: bash {0} | |
run: | | |
# Script based largely on update_moh_template.sh | |
python src/clinical_etl/generate_schema.py --out moh_template | |
diff moh_template.csv moh_v3_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 tests/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 |