Skip to content

Commit

Permalink
Merge pull request #201 from jitseniesen/codecov
Browse files Browse the repository at this point in the history
PR: Update codecov coverage upload to use GitHub Action
  • Loading branch information
jitseniesen authored Apr 18, 2023
2 parents d043cde + 2375bfc commit b640222
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 12 deletions.
39 changes: 29 additions & 10 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,34 @@ jobs:
mamba list
- name: Run tests (Linux)
if: matrix.OS == 'ubuntu'
shell: bash -l {0}
run: xvfb-run --auto-servernum pytest spyder_unittest --cov=spyder_unittest -x -vv
timeout-minutes: 10
- name: Run tests (Mac / Windows)
if: matrix.OS != 'ubuntu'
shell: bash -l {0}
run: pytest spyder_unittest -x -vv
timeout-minutes: 10
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
. ~/.profile
xvfb-run --auto-servernum pytest spyder_unittest --cov=spyder_unittest --cov-report=xml -vv
- name: Run tests (MacOS)
if: matrix.OS == 'macos'
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
shell: bash
command: |
. ~/.profile
pytest spyder_unittest -x -vv
- name: Run tests (Windows)
if: matrix.OS == 'windows'
uses: nick-fields/retry@v2
with:
timeout_minutes: 10
max_attempts: 3
command: pytest spyder_unittest -x -vv
- name: Upload coverage to Codecov
if: matrix.OS == 'ubuntu' && matrix.PYTHON_VERSION == '3.10'
shell: bash -l {0}
run: codecov -t 3458851b-c7a5-4108-be5e-9d19066a2fde
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}

1 change: 0 additions & 1 deletion requirements/tests.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
codecov
flaky
nose
pytest>=5
Expand Down
2 changes: 1 addition & 1 deletion spyder_unittest/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@


@pytest.fixture
def main_window(request):
def main_window():
"""Main Window fixture"""

# Don't show tours message
Expand Down

0 comments on commit b640222

Please sign in to comment.