From d7299d92af07852ab488d4ff3ceaa801ffc6aa28 Mon Sep 17 00:00:00 2001 From: "M. Zain Sohail" Date: Thu, 12 Oct 2023 15:39:51 +0200 Subject: [PATCH] try distributed testing and coveralls action --- .github/workflows/pytest_coveralls.yml | 34 -------------------- .github/workflows/pytest_muliversion.yml | 40 ------------------------ .github/workflows/testing.yml | 17 +++++----- 3 files changed, 10 insertions(+), 81 deletions(-) delete mode 100644 .github/workflows/pytest_coveralls.yml delete mode 100644 .github/workflows/pytest_muliversion.yml diff --git a/.github/workflows/pytest_coveralls.yml b/.github/workflows/pytest_coveralls.yml deleted file mode 100644 index 4909c2a3..00000000 --- a/.github/workflows/pytest_coveralls.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will install Python dependencies, run tests for a single versions of Python and commit test results to coveralls -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: pytest - -on: pull_request - -jobs: - pytest: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - name: Set up Python 3.8 - uses: actions/setup-python@v4 - with: - python-version: 3.8 - - name: Install dependencies - run: | - git lfs pull - python -m pip install --upgrade pip - python -m pip install pytest coverage coveralls - - name: Install package - run: | - python -m pip install . - - name: Test with pytest - run: | - coverage run -m pytest -sv --show-capture=no tests - - name: Submit to coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - coveralls --service=github diff --git a/.github/workflows/pytest_muliversion.yml b/.github/workflows/pytest_muliversion.yml deleted file mode 100644 index 955304ea..00000000 --- a/.github/workflows/pytest_muliversion.yml +++ /dev/null @@ -1,40 +0,0 @@ -# This workflow will install Python dependencies, and run tests for multiple versions of Python -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: pytest - -on: - push: - branches: [main] - -jobs: - pytest: - runs-on: ubuntu-latest - strategy: - matrix: - python_version: ["3.8", "3.9", "3.10"] - - steps: - - uses: actions/checkout@v3 - with: - lfs: true - - name: Set up Python ${{ matrix.python_version }} - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python_version }} - - name: Install dependencies - run: | - git lfs pull - python -m pip install --upgrade pip - python -m pip install pytest coverage coveralls - - name: Install package - run: | - python -m pip install . - - name: Test with pytest - run: | - coverage run -m pytest -sv --show-capture=no tests - - name: Submit to coveralls - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - run: | - coveralls --service=github diff --git a/.github/workflows/testing.yml b/.github/workflows/testing.yml index a816e5fc..5abebf8f 100644 --- a/.github/workflows/testing.yml +++ b/.github/workflows/testing.yml @@ -22,17 +22,20 @@ jobs: with: lfs: true - - name: "Setup Python, Poetry and Dependencies" - uses: packetcoders/action-setup-cache-python-poetry@main - with: - python-version: ${{matrix.python-version}} - poetry-version: 1.2.2 + # - name: "Setup Python and Dependencies" + # uses: actions/setup-python@v4 + # with: + # python-version: ${{matrix.python-version}} + # check-latest: true + # cache: 'poetry' # caching poetry dependencies #------------------------# - # Run pytest # + # Run pytest #------------------------# - name: Run tests run: | - poetry run pytest + poetry run pytest --cov=sed -n auto tests/ # Coveralls missing + - name: Coveralls + uses: coverallsapp/github-action@v2