Skip to content

Commit 7133020

Browse files
committed
Use coveralls github action
Because the command-line coveralls tool pins coverage < 7.0, which doesn't work well on Python 3.12. Also update all the GitHub actions to the latest versions and tweak YAML formatting so all the shell commands are aligned.
1 parent 0554c1d commit 7133020

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

.github/workflows/build.yml

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,15 @@ jobs:
2929

3030
steps:
3131
- name: Git clone
32-
uses: actions/checkout@v2
32+
uses: actions/checkout@v4
3333

3434
- name: Set up Python ${{ matrix.python-version }}
35-
uses: actions/setup-python@v2
35+
uses: actions/setup-python@v4
3636
with:
3737
python-version: "${{ matrix.python-version }}"
3838

3939
- name: Pip cache
40-
uses: actions/cache@v2
40+
uses: actions/cache@v3
4141
with:
4242
path: ~/.cache/pip
4343
key: ${{ runner.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('setup.py') }}
@@ -49,23 +49,24 @@ jobs:
4949
run: |
5050
python -m pip install -U pip
5151
python -m pip install -U setuptools wheel
52-
python -m pip install -U pytest coverage coveralls
52+
python -m pip install -U pytest coverage
5353
python -m pip install -e .
5454
5555
- name: Run tests
56-
run: coverage run -m pytest tests
56+
run: |
57+
coverage run -m pytest tests
5758
5859
- name: Check test coverage
59-
run: coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }}
60+
run: |
61+
coverage report -m --fail-under=${{ (matrix.python-version == 'pypy-3.10') && 99 || 100 }}
62+
coverage xml
6063
# pypy3.10 thinks utils.py has one uncovered branch (140 -> 133), which
6164
# I think is just pypy's optimizer being too smart for coverage.py.
6265

6366
- name: Report to coveralls
64-
run: coveralls
65-
continue-on-error: true
66-
env:
67-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68-
COVERALLS_SERVICE_NAME: github
67+
uses: coverallsapp/github-action@v2
68+
with:
69+
file: coverage.xml
6970

7071
lint:
7172
name: ${{ matrix.toxenv }}
@@ -82,15 +83,15 @@ jobs:
8283

8384
steps:
8485
- name: Git clone
85-
uses: actions/checkout@v2
86+
uses: actions/checkout@v4
8687

8788
- name: Set up Python ${{ env.default_python || '3.9' }}
88-
uses: actions/setup-python@v2
89+
uses: actions/setup-python@v4
8990
with:
9091
python-version: "${{ env.default_python || '3.9' }}"
9192

9293
- name: Pip cache
93-
uses: actions/cache@v2
94+
uses: actions/cache@v3
9495
with:
9596
path: ~/.cache/pip
9697
key: ${{ runner.os }}-pip-${{ matrix.toxenv }}-${{ hashFiles('tox.ini') }}
@@ -105,4 +106,5 @@ jobs:
105106
python -m pip install -U tox
106107
107108
- name: Run ${{ matrix.toxenv }}
108-
run: python -m tox -e ${{ matrix.toxenv }}
109+
run: |
110+
python -m tox -e ${{ matrix.toxenv }}

0 commit comments

Comments
 (0)