-
-
Notifications
You must be signed in to change notification settings - Fork 65
46 lines (42 loc) · 1.19 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: ci
on:
push:
branches:
- trunk
pull_request:
branches:
- trunk
jobs:
build:
name: python/${{ matrix.python }} tox/${{ matrix.TOX_ENV }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python: ["3.8", "3.10", "3.11"]
TOX_ENV: ["extras", "noextras", "mypy"]
include:
- python: "3.11"
TOX_ENV: "lint"
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Tox Run
run: |
pip install tox;
TOX_ENV="py$(echo ${{ matrix.python }} | sed -e 's/\.//g')-${{ matrix.TOX_ENV }}";
echo "Starting: ${TOX_ENV} ${PUSH_DOCS}"
if [[ -n "${TOX_ENV}" ]]; then
tox -e "$TOX_ENV";
if [[ "${{ matrix.TOX_ENV }}" != "mypy" && "${{ matrix.TOX_ENV }}" != "lint" ]]; then
tox -e coverage-report;
fi;
fi;
- name: Upload coverage report
if: ${{ matrix.TOX_ENV != 'mypy' }}
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}