From a94f7d995f6cfae5c1459f9aa697d4dffdfff870 Mon Sep 17 00:00:00 2001 From: Lu Weizheng Date: Mon, 19 Aug 2024 19:49:07 +0800 Subject: [PATCH] CI GPU --- .github/workflows/python.yaml | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/.github/workflows/python.yaml b/.github/workflows/python.yaml index 39331ee..d725492 100644 --- a/.github/workflows/python.yaml +++ b/.github/workflows/python.yaml @@ -141,18 +141,22 @@ jobs: working-directory: ./python - name: Test with pytest - env: - MODULE: ${{ matrix.module }} + if: ${{ matrix.module != 'gpu' }} run: | - if [[ "$MODULE" == "xoscar" ]]; then - pytest --timeout=1500 \ - -W ignore::PendingDeprecationWarning \ - --cov-config=setup.cfg --cov-report=xml --cov=xoscar xoscar --capture=no - else - ${{ env.SELF_HOST_PYTHON }} -m pytest -m cuda --cov-config=setup.cfg --cov-report=xml --cov=xoscar --capture=no - fi + pytest --timeout=1500 \ + -W ignore::PendingDeprecationWarning \ + --cov-config=setup.cfg --cov-report=xml \ + --cov=xoscar xoscar --capture=no working-directory: ./python + - name: Test with pytest GPU + if: ${{ matrix.module == 'gpu' }} + run: | + ${{ env.SELF_HOST_PYTHON }} -m pytest -m cuda \ + --cov-config=setup.cfg --cov-report=xml \ + --cov=xoscar --capture=no + working-directory: ./python + - name: Report coverage data uses: codecov/codecov-action@v4 with: