forked from ni/nimi-python
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
46 lines (42 loc) · 2.28 KB
/
.travis.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
group: travis_latest
language: python
dist: focal
matrix:
include:
# Historically, we've run tests on the latest supported version of Python first.
# For now, we're running Python 3.12 first, because it's the version currently used for codegen.
# This is where additional tests are run so we give it more time.
# When the version used for codegen changes, the version that runs first should change to match.
- python: "3.12"
- python: "3.9"
- python: "3.10"
- python: "3.11"
- python: "3.13"
install:
- travis_retry sudo apt-get -y install python3-pip
- travis_retry pip install --upgrade pip
# tox 4.0 broke plugin compatibility
# TODO(ni-jfitzger): When tox-travis has a release compatible with tox>=4.0, remove the tox version specifier (Tracked on GitHub by #1876)
- travis_retry pip install --upgrade tox==3.* tox-travis
before_script:
# Python 3.13 is only supported by grpcio-tools >= 1.67.0, a later version than what we use in the tox.ini
- if [[ "$TRAVIS_PYTHON_VERSION" != "3.13" ]]; then python tools/ensure_codegen_up_to_date.py; fi
script:
- tox -c tox-travis.ini
after_success:
# Install and verify codecov tool
- travis_retry curl https://keybase.io/codecovsecurity/pgp_keys.asc | gpg --no-default-keyring --keyring trustedkeys.gpg --import
- travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov # download codecov tool
- travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
- travis_retry curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
- travis_retry gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
- travis_retry shasum -a 256 -c codecov.SHA256SUM
- travis_retry chmod +x codecov
# upload coverage
- travis_retry ./codecov --flags codegenunittests --file codegen.xml
- travis_retry ./codecov --flags nifakeunittests --file nifakeunittest.xml
- travis_retry ./codecov --flags nidcpowerunittests --file nidcpowerunittest.xml
- travis_retry ./codecov --flags nidigitalunittests --file nidigitalunittest.xml
- travis_retry ./codecov --flags nimodinstunittests --file nimodinstunittest.xml
- travis_retry ./codecov --flags niscopeunittests --file niscopeunittest.xml
- travis_retry ./codecov --flags nitclkunittests --file nitclkunittest.xml