Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix codecov and test failures #662

Merged
merged 3 commits into from
Oct 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 7 additions & 13 deletions .github/workflows/execute-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,15 @@ on:
workpath:
required: true
type: string
secrets:
CODECOV_TOKEN:
required: true

jobs:
test:
runs-on: ${{ inputs.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
name: Python ${{ matrix.python-version }}
Expand Down Expand Up @@ -56,18 +59,9 @@ jobs:
- name: Install project dependencies
run: make install

# Some tests fails intermittently, likely due to the public runners being
# very slow. Especially any client/server tests seems to be problematic.
# This is a simple attempt to re-run the tests up to three times if they
# fail. Does not add any execution time if successful.
- uses: Wandalen/wretry.action@v1.4.4
name: Run tests
with:
command: make test
current_path: ${{ inputs.workpath }}
attempt_limit: 5
attempt_delay: 2000

- name: Run tests
run: make test

- name: Upload coverage
uses: codecov/codecov-action@v4
if: ${{ inputs.os == 'ubuntu-latest' && matrix.python-version == '3.9' && github.repository == 'doorstop-dev/doorstop' }}
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,11 @@ jobs:
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"

Test:
uses: ./.github/workflows/execute-tests.yml
with:
os: "ubuntu-latest"
workpath: "/home/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 2 additions & 0 deletions .github/workflows/test-osx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@ jobs:
with:
os: "macos-13"
workpath: "/Users/runner/work/doorstop/doorstop"
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
2 changes: 2 additions & 0 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ jobs:
basepath: 'D:\'
os: "windows-latest"
workpath: 'C:\a\doorstop\doorstop'
secrets:
CODECOV_TOKEN: ${{secrets.CODECOV_TOKEN}}
Loading