From 2afe6dc970980077da58827055fe2ce83be2f62e Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 10:46:49 +1100 Subject: [PATCH 1/6] Create codecov.yml Add code coverage action --- .github/workflows/codecov.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/codecov.yml diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml new file mode 100644 index 0000000..5cb243d --- /dev/null +++ b/.github/workflows/codecov.yml @@ -0,0 +1,16 @@ +name: Code Coverage + +on: [push, pull_request] + +jobs: + build-python3-linux: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.7] + + steps: + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + env: + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} From 8fe78e11186afcc643b8dfc447f9d16f554617d1 Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 10:55:16 +1100 Subject: [PATCH 2/6] Add codecov config file --- codecov.yml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 codecov.yml diff --git a/codecov.yml b/codecov.yml new file mode 100644 index 0000000..6abfd18 --- /dev/null +++ b/codecov.yml @@ -0,0 +1,6 @@ +ignore: + - "docs" + - "__init__.py" + - "reformat.py" + - "setup.py" + From 30f4ee8b68d5ae949e20ccafbcafbd2623642d49 Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 11:06:29 +1100 Subject: [PATCH 3/6] Add checkout step for codecov --- .github/workflows/codecov.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index 5cb243d..f041d63 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -10,6 +10,14 @@ jobs: python-version: [3.7] steps: + - uses: actions/checkout@v2 + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + - name: Test with pytest + run: | + coverage run -m pytest -v AL/omx/tests - name: Upload coverage reports to Codecov uses: codecov/codecov-action@v3 env: From 4077bbf2f95988dc54d235cead1363a91de13e75 Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 11:09:02 +1100 Subject: [PATCH 4/6] Install pip dependency for codecov --- .github/workflows/codecov.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index f041d63..cff0748 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -15,6 +15,9 @@ jobs: uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} + - name: Install dependencies + run: | + pip install coverage - name: Test with pytest run: | coverage run -m pytest -v AL/omx/tests From 589dd65b39dec3438bab8d7d4b4a32e4f1ddcf52 Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 11:10:25 +1100 Subject: [PATCH 5/6] Add pytest dependency for codecov --- .github/workflows/codecov.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index cff0748..566967c 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -18,6 +18,7 @@ jobs: - name: Install dependencies run: | pip install coverage + pip install pytest - name: Test with pytest run: | coverage run -m pytest -v AL/omx/tests From 238aa51aab4aabb4777466789477a079d65e7a4d Mon Sep 17 00:00:00 2001 From: Miguel Gao Date: Tue, 5 Dec 2023 11:14:12 +1100 Subject: [PATCH 6/6] Fix wrong import --- AL/omx/tests/test_omxundo.py | 1 - 1 file changed, 1 deletion(-) diff --git a/AL/omx/tests/test_omxundo.py b/AL/omx/tests/test_omxundo.py index c5f7ce2..5d280b3 100644 --- a/AL/omx/tests/test_omxundo.py +++ b/AL/omx/tests/test_omxundo.py @@ -17,7 +17,6 @@ import unittest from AL.omx.utils._stubs import cmds -from maya import cmds from AL import omx from AL.omx.utils import _contexts as omu_contexts