diff --git a/.coverage b/.coverage new file mode 100644 index 00000000..8558824d Binary files /dev/null and b/.coverage differ diff --git a/.github/workflows/python-app.yml b/.github/workflows/python-app.yml index 3a5983f6..0a00c10b 100644 --- a/.github/workflows/python-app.yml +++ b/.github/workflows/python-app.yml @@ -11,6 +11,7 @@ on: env: PYTHONPATH: /Users/Shared/folio_migration_tools + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} jobs: build: @@ -33,4 +34,6 @@ jobs: git clone https://github.com/FOLIO-FSE/folio_migration_tools.git /Users/Shared/folio_migration_tools --depth=2 - name: Test with pytest run: | - pytest + coverage run -m pytest + coverage lcov + coveralls --service=github diff --git a/.gitignore b/.gitignore index 7d311b25..9713704b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,6 @@ log* .env __pycache__/ +.coveralls.yml +.coverage +coverage.lcov diff --git a/README.md b/README.md index 28944ad4..a0810db0 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Coverage Status](https://coveralls.io/repos/github/sul-dlss/libsys-airflow/badge.svg?branch=main)](https://coveralls.io/github/sul-dlss/libsys-airflow?branch=main) + # libsys-airflow Airflow DAGS for libsys processes and migrating ILS data into FOLIO @@ -54,5 +56,8 @@ the location of where you have local clone repository of the `PYTHONPATH='{path-to-folio_migration_tools}' pytest` +To run with code coverage: +`PYTHONPATH=../folio_migration_tools/ coverage run -m pytest` + ## Symphony Mount MARC data to be converted will be mounted on the sul-libsys-airflow server under `/sirsi_prod` which is a mount of `/s/SUL/Dataload/Folio` on the Symphony server. diff --git a/requirements.txt b/requirements.txt index 8a3ee26e..8915e2d7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,7 @@ apache-airflow argparse_prompt +coverage +coveralls flake8 folioclient folio-uuid