Skip to content
Closed
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
19 changes: 10 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,8 @@ jobs:
LSP: '${{ matrix.lsp }}'
LSP_EXTRACT_FILE: '${{ matrix.lsp_extract_file }}'
- if: always()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
directory: empty
name: Windows (${{ matrix.python }}, ${{ matrix.arch }}${{ matrix.extra_name }})
# multiple flags is marked as an error in codecov UI, but is actually fine
# https://github.com/codecov/feedback/issues/567
Expand Down Expand Up @@ -281,6 +280,10 @@ jobs:
run:
python -m pip install tox &&
tox -m check
- name: Install python3-apport
run: |
sudo apt update
sudo apt install -q python3-apport
- name: Run tests
if: matrix.check_formatting == '0'
run: ./ci.sh
Expand All @@ -289,9 +292,8 @@ jobs:
- if: >-
always()
&& matrix.check_formatting != '1'
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
directory: empty
name: Ubuntu (${{ matrix.python }}${{ matrix.extra_name }})
flags: Ubuntu,${{ matrix.python }}
fail_ci_if_error: false
Expand Down Expand Up @@ -332,9 +334,8 @@ jobs:
- name: Run tests
run: ./ci.sh
- if: always()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
directory: empty
name: macOS (${{ matrix.python }})
flags: macOS,${{ matrix.python }}
fail_ci_if_error: false
Expand All @@ -353,7 +354,8 @@ jobs:
# `python3-dev` (rather than `python:alpine`) for some ctypes reason,
# `nodejs` for pyright (`node-env` pulls in nodejs but that takes a while and can time out the test).
# `perl` for a platform independent `sed -i` alternative
run: apk update && apk add python3-dev bash nodejs perl
# `git`, `curl`, `gpg` for codecov
run: apk update && apk add python3-dev bash nodejs perl git curl gpg

- name: Retrieve the project source from an sdist inside the GHA artifact
# must be after `apk add` because it relies on `bash` existing
Expand All @@ -378,9 +380,8 @@ jobs:
f.write("\n")

- if: always()
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
directory: empty
name: Alpine
flags: Alpine,${{ steps.get-version.outputs.version }}
fail_ci_if_error: false
Expand Down
11 changes: 4 additions & 7 deletions ci.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,6 @@ else
flags=""
fi

# So we can run the test for our apport/excepthook interaction working
if [ -e /etc/lsb-release ] && grep -q Ubuntu /etc/lsb-release; then
sudo apt install -q python3-apport
fi

# If we're testing with a LSP installed, then it might break network
# stuff, so wait until after we've finished setting everything else
# up.
Expand Down Expand Up @@ -142,8 +137,10 @@ echo "::endgroup::"
echo "::group::Coverage"

coverage combine --rcfile ../pyproject.toml
coverage report -m --rcfile ../pyproject.toml
coverage xml --rcfile ../pyproject.toml
cd .. # coverage needs to be in the folder containing src/trio
cp empty/.coverage .
coverage report -m --rcfile ./pyproject.toml
coverage xml --rcfile ./pyproject.toml

# Remove the LSP again; again we want to do this ASAP to avoid
# accidentally breaking other stuff.
Expand Down
11 changes: 3 additions & 8 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -292,18 +292,13 @@ show_contexts = true
skip_covered = false

[tool.coverage.paths]
_site-packages-to-src-mapping = [
source = [
"src",
"*/src",
'*\src',
"*/lib/pypy*/site-packages",
"*/lib/python*/site-packages",
'*\Lib\site-packages',
"**/site-packages"
]

[tool.coverage.run]
branch = true
source_pkgs = ["trio"]
omit = [
# Omit the generated files in trio/_core starting with _generated_
"*/trio/_core/_generated_*",
Expand All @@ -319,7 +314,7 @@ omit = [
parallel = true
plugins = []
relative_files = true
source = ["."]
source = ["trio"]

[tool.coverage.report]
precision = 1
Expand Down