From 544e0d34e30a35564b0864ca284cbc16ecef9253 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:22:22 -0400 Subject: [PATCH 01/10] add code coverage CI to pipeline code --- .github/workflows/test_pipeline.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index bcd3287c..abc699e0 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -20,7 +20,24 @@ jobs: key: ${{ runner.os }}-poetry - name: install poetry run: pip install poetry + - name: install package run: poetry install -C pipeline + + - name: install pytest-cov + run: poetry run -C pipeline pip install pytest-cov + - name: run tests - run: poetry run -C pipeline pytest pipeline + run: poetry run -C pipeline pytest pipeline \ + --cov=pyrenew --cov-report term --cov-report xml model + + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + env_vars: OS,PYTHON + fail_ci_if_error: true + flags: unittests + file: coverage.xml + plugin: pycoverage + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true From 181076ec99e07092190623fed477f154c7cf30a0 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:25:53 -0400 Subject: [PATCH 02/10] do coverage of pipeline not pyrenew --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index abc699e0..e3c02c91 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -29,7 +29,7 @@ jobs: - name: run tests run: poetry run -C pipeline pytest pipeline \ - --cov=pyrenew --cov-report term --cov-report xml model + --cov=pipeline --cov-report term --cov-report xml model - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From 0b979f79d0b341a4eb7969bb58ae9ace18bd048d Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:32:42 -0400 Subject: [PATCH 03/10] don't hand in path if already telling poetry path, maybe don't need to tell pytest a path --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index e3c02c91..3d4923b2 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -29,7 +29,7 @@ jobs: - name: run tests run: poetry run -C pipeline pytest pipeline \ - --cov=pipeline --cov-report term --cov-report xml model + --cov-report term --cov-report xml model - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From 98e6b28395409ed643a65f05c6292f171d65c6cd Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:37:49 -0400 Subject: [PATCH 04/10] remove extra model reference --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index 3d4923b2..c401ee30 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -29,7 +29,7 @@ jobs: - name: run tests run: poetry run -C pipeline pytest pipeline \ - --cov-report term --cov-report xml model + --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From 5df91dadd9651664eb959cbfdf27f2ab90a0df08 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:42:51 -0400 Subject: [PATCH 05/10] need some path? --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index c401ee30..125fbdee 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -29,7 +29,7 @@ jobs: - name: run tests run: poetry run -C pipeline pytest pipeline \ - --cov-report term --cov-report xml + --cov "." --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From 17b392aa7d3b4f089ab8a9f535280101c3f511f0 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 13:50:20 -0400 Subject: [PATCH 06/10] works locally, so it'll work here right? --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index 125fbdee..60320e57 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -29,7 +29,7 @@ jobs: - name: run tests run: poetry run -C pipeline pytest pipeline \ - --cov "." --cov-report term --cov-report xml + --cov=pipeline --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From 50bf43048080802eb79b7598480fb9cf123572cc Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 14:10:01 -0400 Subject: [PATCH 07/10] closer to model CI --- .github/workflows/test_pipeline.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index 60320e57..fb33d905 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -28,7 +28,7 @@ jobs: run: poetry run -C pipeline pip install pytest-cov - name: run tests - run: poetry run -C pipeline pytest pipeline \ + run: poetry run -C pipeline pytest \ --cov=pipeline --cov-report term --cov-report xml - name: Upload coverage to Codecov From 647d00b1690f2750cccfe1aa1831cfcae3d4e1f9 Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 14:11:42 -0400 Subject: [PATCH 08/10] raw copy of working local code --- .github/workflows/test_pipeline.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index fb33d905..dd2ce7d3 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -28,9 +28,7 @@ jobs: run: poetry run -C pipeline pip install pytest-cov - name: run tests - run: poetry run -C pipeline pytest \ - --cov=pipeline --cov-report term --cov-report xml - + run: poetry run -C pipeline pytest pipeline --cov=pipeline --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From a48e75ea85abe86a48d50aa7e43a76d3f2d2803c Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 14:13:21 -0400 Subject: [PATCH 09/10] break long line --- .github/workflows/test_pipeline.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index dd2ce7d3..8e8f3395 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -28,7 +28,8 @@ jobs: run: poetry run -C pipeline pip install pytest-cov - name: run tests - run: poetry run -C pipeline pytest pipeline --cov=pipeline --cov-report term --cov-report xml + run: poetry run -C pipeline pytest pipeline \ + --cov=pipeline --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From 4e10440b80a5987f2d9213a7e838e0c646e357da Mon Sep 17 00:00:00 2001 From: Nate McIntosh Date: Mon, 8 Apr 2024 14:17:53 -0400 Subject: [PATCH 10/10] go back to long line I guess --- .github/workflows/test_pipeline.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test_pipeline.yml b/.github/workflows/test_pipeline.yml index 8e8f3395..dd2ce7d3 100644 --- a/.github/workflows/test_pipeline.yml +++ b/.github/workflows/test_pipeline.yml @@ -28,8 +28,7 @@ jobs: run: poetry run -C pipeline pip install pytest-cov - name: run tests - run: poetry run -C pipeline pytest pipeline \ - --cov=pipeline --cov-report term --cov-report xml + run: poetry run -C pipeline pytest pipeline --cov=pipeline --cov-report term --cov-report xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: