Skip to content

Commit 82d6c7f

Browse files
committed
build workflow: split typing in a separate job.
1 parent af42f43 commit 82d6c7f

File tree

2 files changed

+19
-20
lines changed

2 files changed

+19
-20
lines changed

.github/workflows/build.yaml

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,16 +28,31 @@ jobs:
2828

2929
steps:
3030

31-
- uses: actions/checkout@v4
31+
- uses: actions/checkout@v5
3232

3333
- uses: actions/setup-python@v5
3434
with:
3535
python-version: ${{ matrix.python-version }}
3636
allow-prereleases: true
3737

38-
- run: ./run.sh ci-install
39-
- run: ./run.sh ci-run
38+
- run: pip install -e '.[all]' --group tests
39+
- run: coverage run -m pytest --runslow
40+
- run: ./run.sh coverage-report
4041

41-
- uses: codecov/codecov-action@v4
42+
- uses: codecov/codecov-action@v5
4243
with:
4344
token: ${{ secrets.CODECOV_TOKEN }}
45+
46+
typing:
47+
runs-on: ubuntu-latest
48+
49+
steps:
50+
51+
- uses: actions/checkout@v5
52+
53+
- uses: actions/setup-python@v5
54+
with:
55+
python-version-file: 'pyproject.toml'
56+
57+
- run: pip install -e . --group typing
58+
- run: mypy

run.sh

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,6 @@ function test-all {
7474

7575

7676
function typing {
77-
if on-pypy; then
78-
# mypy does not work on pypy as of January 2020
79-
# https://github.com/python/typed_ast/issues/97#issuecomment-484335190
80-
echo "mypy does not work on pypy, doing nothing"
81-
return
82-
fi
83-
8477
mypy --strict --show-error-codes src "$@"
8578

8679
mkdir -p build
@@ -140,15 +133,6 @@ function entr-project-files {
140133
}
141134

142135

143-
function ci-install {
144-
pip install -e '.[all]' --group tests --group typing
145-
}
146-
147-
function ci-run {
148-
command coverage run -m pytest --runslow && coverage-report && typing
149-
}
150-
151-
152136
function on-pypy {
153137
[[ $( python -c 'import sys; print(sys.implementation.name)' ) == pypy ]]
154138
}

0 commit comments

Comments
 (0)