From 0fa7cc2165d053e1749db10925dad4c5095a3646 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 15:32:57 -0700 Subject: [PATCH 01/18] Update README.md Added codecov coverage badge to README --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 9082560a..2c05e0de 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,7 @@ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Support Ukraine](https://img.shields.io/badge/Support-Ukraine-FFD500?style=flat&labelColor=005BBB)](https://opensource.fb.com/support-ukraine) +[![codecov](https://codecov.io/gh/facebookresearch/Pearl/graph/badge.svg?token=CARFOP3E30)](https://codecov.io/gh/facebookresearch/Pearl) More details of the library at our [official website](https://pearlagent.github.io). From de924881705c207be18a25894b5917d415604456 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 15:35:50 -0700 Subject: [PATCH 02/18] Update codecov.yml --- .github/workflows/codecov.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 2950b905..6e74742a 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -20,6 +20,7 @@ jobs: pip install coverage coverage run -m unittest - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v3 - env: - CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} + uses: codecov/codecov-action@v4.0.1 + with: + token: ${{ secrets.CODECOV_TOKEN }} + slug: facebookresearch/Pearl From ad35eb594c33b2c7e93b8a55d7d92bbca4981157 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 16:12:24 -0700 Subject: [PATCH 03/18] Create workflow.yml --- .github/workflows/workflow.yml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/workflow.yml diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml new file mode 100644 index 00000000..6b5621fd --- /dev/null +++ b/.github/workflows/workflow.yml @@ -0,0 +1,33 @@ +name: Workflow for Codecov Action +on: [push, pull_request] +jobs: + run: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-latest, windows-latest] + env: + OS: ${{ matrix.os }} + PYTHON: '3.8' + steps: + - uses: actions/checkout@master + - name: Setup Python + uses: actions/setup-python@master + with: + python-version: 3.8 + - name: Generate coverage report + run: | + pip install pytest + pip install pytest-cov + pytest --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + directory: ./coverage/reports/ + env_vars: OS,PYTHON + fail_ci_if_error: true + files: ./coverage1.xml,./coverage2.xml,!./cache + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true From 7f2c2d580d60bebe4b7504830cd9ac33a5ed8387 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 16:23:12 -0700 Subject: [PATCH 04/18] Update workflow.yml --- .github/workflows/workflow.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 6b5621fd..eed104c3 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -19,6 +19,7 @@ jobs: run: | pip install pytest pip install pytest-cov + pip install . pytest --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 From e006299eccb58c15e15a5a533ec0efe0b1717b42 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 16:43:39 -0700 Subject: [PATCH 05/18] Update workflow.yml --- .github/workflows/workflow.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index eed104c3..eb1ec550 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -10,17 +10,19 @@ jobs: OS: ${{ matrix.os }} PYTHON: '3.8' steps: - - uses: actions/checkout@master + - uses: actions/checkout@v4 - name: Setup Python - uses: actions/setup-python@master + uses: actions/setup-python@v4 with: python-version: 3.8 + - name: Install dependencies + run: | + pip install pytest + pip install pytest-cov + pip install . - name: Generate coverage report run: | - pip install pytest - pip install pytest-cov - pip install . - pytest --cov=./ --cov-report=xml + python -m unittest discover -t . test.unit --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From 82e14737cf286a3d71b9dc899854365b96f32430 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 16:54:52 -0700 Subject: [PATCH 06/18] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index eb1ec550..29f78249 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -22,7 +22,7 @@ jobs: pip install . - name: Generate coverage report run: | - python -m unittest discover -t . test.unit --cov=./ --cov-report=xml + pytest -m unittest discover -t . test.unit --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From c7d48df356edf25dfeff98ba0d5807db251be814 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:01:25 -0700 Subject: [PATCH 07/18] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 29f78249..da55bec8 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -22,7 +22,7 @@ jobs: pip install . - name: Generate coverage report run: | - pytest -m unittest discover -t . test.unit --cov=./ --cov-report=xml + pytest test/unit/ --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From c344b648591402ed1eac68d671db5a99de993704 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:05:36 -0700 Subject: [PATCH 08/18] Update workflow.yml --- .github/workflows/workflow.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index da55bec8..4b5499a7 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -28,7 +28,7 @@ jobs: with: directory: ./coverage/reports/ env_vars: OS,PYTHON - fail_ci_if_error: true + fail_ci_if_error: false files: ./coverage1.xml,./coverage2.xml,!./cache flags: unittests name: codecov-umbrella From d80e4d0c2c6db01c083df21e2884cbe280a69597 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:10:16 -0700 Subject: [PATCH 09/18] Update workflow.yml --- .github/workflows/workflow.yml | 37 +++++++++++----------------------- 1 file changed, 12 insertions(+), 25 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index 4b5499a7..d18bd655 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -5,32 +5,19 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest, macos-latest, windows-latest] + os: [ubuntu-latest] env: OS: ${{ matrix.os }} PYTHON: '3.8' steps: - - uses: actions/checkout@v4 - - name: Setup Python - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install dependencies - run: | - pip install pytest - pip install pytest-cov - pip install . - - name: Generate coverage report - run: | - pytest test/unit/ --cov=./ --cov-report=xml - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v4 - with: - directory: ./coverage/reports/ - env_vars: OS,PYTHON - fail_ci_if_error: false - files: ./coverage1.xml,./coverage2.xml,!./cache - flags: unittests - name: codecov-umbrella - token: ${{ secrets.CODECOV_TOKEN }} - verbose: true + - uses: actions/checkout@master + - uses: codecov/codecov-action@v4 + with: + fail_ci_if_error: true # optional (default = false) + files: ./coverage1.xml,./coverage2.xml # optional + flags: unittests # optional + name: codecov-umbrella # optional + token: ${{ secrets.CODECOV_TOKEN }} # required + verbose: true # optional (default = false) + + From 7d948f7467e8cb4262411ed5d5f96ba0d16e3fcf Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:14:04 -0700 Subject: [PATCH 10/18] Update workflow.yml --- .github/workflows/workflow.yml | 39 ++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index d18bd655..1a00d18b 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -5,19 +5,32 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - os: [ubuntu-latest] + os: [ubuntu-latest, macos-latest, windows-latest] env: OS: ${{ matrix.os }} - PYTHON: '3.8' + PYTHON: '3.9' steps: - - uses: actions/checkout@master - - uses: codecov/codecov-action@v4 - with: - fail_ci_if_error: true # optional (default = false) - files: ./coverage1.xml,./coverage2.xml # optional - flags: unittests # optional - name: codecov-umbrella # optional - token: ${{ secrets.CODECOV_TOKEN }} # required - verbose: true # optional (default = false) - - + - uses: actions/checkout@v4 + - name: Setup Python + uses: actions/setup-python@v4 + with: + python-version: 3.9 + - name: Install dependencies + run: | + pip install pytest + pip install pytest-cov + pip install . + - name: Generate coverage report + run: | + pytest test/unit/with_pytorch/test_action_utils.py --cov=./ --cov-report=xml + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v4 + with: + directory: ./coverage/reports/ + env_vars: OS,PYTHON + fail_ci_if_error: false + files: ./coverage1.xml,./coverage2.xml,!./cache + flags: unittests + name: codecov-umbrella + token: ${{ secrets.CODECOV_TOKEN }} + verbose: true From 0861faed088af22b3ac7d3c283fae9a9206f1f11 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:21:28 -0700 Subject: [PATCH 11/18] Update and rename workflow.yml to CI.yml --- .github/workflows/{workflow.yml => CI.yml} | 5 ----- 1 file changed, 5 deletions(-) rename .github/workflows/{workflow.yml => CI.yml} (82%) diff --git a/.github/workflows/workflow.yml b/.github/workflows/CI.yml similarity index 82% rename from .github/workflows/workflow.yml rename to .github/workflows/CI.yml index 1a00d18b..1060c1ff 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/CI.yml @@ -26,11 +26,6 @@ jobs: - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: - directory: ./coverage/reports/ env_vars: OS,PYTHON - fail_ci_if_error: false - files: ./coverage1.xml,./coverage2.xml,!./cache - flags: unittests - name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true From c08bcdb40fa997232bc572c9b22914f9027627c4 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:31:55 -0700 Subject: [PATCH 12/18] Update CI.yml --- .github/workflows/CI.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 1060c1ff..a1c89343 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -27,5 +27,8 @@ jobs: uses: codecov/codecov-action@v4 with: env_vars: OS,PYTHON + file: ./coverage.xml + flags: unittests + name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} verbose: true From f81a1b029d8dc8a65a2ed86e125a7d7aaa308932 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:32:08 -0700 Subject: [PATCH 13/18] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1c89343..88b11147 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: pip install . - name: Generate coverage report run: | - pytest test/unit/with_pytorch/test_action_utils.py --cov=./ --cov-report=xml + pytest test/unit/ --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From 8b219cd111e5f02bf611f67942aad7339e395a16 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:40:00 -0700 Subject: [PATCH 14/18] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 88b11147..a1c89343 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,7 +22,7 @@ jobs: pip install . - name: Generate coverage report run: | - pytest test/unit/ --cov=./ --cov-report=xml + pytest test/unit/with_pytorch/test_action_utils.py --cov=./ --cov-report=xml - name: Upload coverage to Codecov uses: codecov/codecov-action@v4 with: From 92ee850f4ac3a35302d34322ec2326a5b0812b2e Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:40:58 -0700 Subject: [PATCH 15/18] Delete .github/workflows/codecov.yml --- .github/workflows/codecov.yml | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml deleted file mode 100644 index 6e74742a..00000000 --- a/.github/workflows/codecov.yml +++ /dev/null @@ -1,26 +0,0 @@ -name: CodeCov -on: [push, pull_request] -jobs: - run: - runs-on: ubuntu-latest - env: - OS: ubuntu-latest - PYTHON: '3.9' - steps: - - uses: checkout@v4 - - name: Setup Python - uses: actions/setup-python@main - with: - python-version: 3.9 - - name: Install Pearl - run: | - pip install -e . - - name: Generate Report - run: | - pip install coverage - coverage run -m unittest - - name: Upload coverage reports to Codecov - uses: codecov/codecov-action@v4.0.1 - with: - token: ${{ secrets.CODECOV_TOKEN }} - slug: facebookresearch/Pearl From e3d44083f1bbcf6c72689220425d2d7f2b821f76 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 17:47:36 -0700 Subject: [PATCH 16/18] Update CI.yml --- .github/workflows/CI.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index a1c89343..f6cb9d31 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -31,4 +31,5 @@ jobs: flags: unittests name: codecov-umbrella token: ${{ secrets.CODECOV_TOKEN }} + slug: facebookresearch/Pearl verbose: true From 1846173cbae5018684b85b90d2063fdd9cc8c43d Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 19:45:41 -0700 Subject: [PATCH 17/18] Update CI.yml --- .github/workflows/CI.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index f6cb9d31..85a8edfb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -22,8 +22,9 @@ jobs: pip install . - name: Generate coverage report run: | - pytest test/unit/with_pytorch/test_action_utils.py --cov=./ --cov-report=xml + pytest test/unit/ --cov=./ --cov-report=xml - name: Upload coverage to Codecov + if: success() || failure() uses: codecov/codecov-action@v4 with: env_vars: OS,PYTHON From dd8398a51e5dd9c44e6ecf8ecece881044dacdf5 Mon Sep 17 00:00:00 2001 From: dkorenkevych Date: Wed, 24 Apr 2024 19:46:53 -0700 Subject: [PATCH 18/18] Update CI.yml --- .github/workflows/CI.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 85a8edfb..ee206b53 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -19,7 +19,7 @@ jobs: run: | pip install pytest pip install pytest-cov - pip install . + pip install -e . - name: Generate coverage report run: | pytest test/unit/ --cov=./ --cov-report=xml