Skip to content

Commit b7a69f3

Browse files
authored
Changes for CI tests (#558)
1 parent bb17a4f commit b7a69f3

File tree

4 files changed

+80
-28
lines changed

4 files changed

+80
-28
lines changed

.github/workflows/test_docker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
container:
1212
image: registry.fedoraproject.org/fedora:${{ matrix.version }}
1313
steps:
14-
- uses: actions/checkout@v2
14+
- uses: actions/checkout@v3
1515
- name: Set up container
1616
run: |
1717
dnf install -y dnf-plugins-core langpacks-en
@@ -45,7 +45,7 @@ jobs:
4545
container:
4646
image: ubuntu:${{ matrix.version }}
4747
steps:
48-
- uses: actions/checkout@v2
48+
- uses: actions/checkout@v3
4949
- name: Set up container
5050
env:
5151
DEBIAN_FRONTEND: noninteractive

.github/workflows/test_docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
container:
2020
image: ubuntu:22.04
2121
steps:
22-
- uses: actions/checkout@v2
22+
- uses: actions/checkout@v3
2323
- name: Set up container
2424
env:
2525
DEBIAN_FRONTEND: noninteractive

.github/workflows/test_tox.yml

Lines changed: 76 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,91 @@ jobs:
1717
- python-version: '3.7'
1818
toxenv: 'py37'
1919
- python-version: '3.8'
20-
toxenv: 'py38,coverage,codecov'
20+
toxenv: 'py38'
2121
- python-version: '3.9'
2222
toxenv: 'py39'
2323
- python-version: '3.10'
2424
toxenv: 'py310'
2525
- python-version: '3.11'
2626
toxenv: 'py311'
27+
container:
28+
image: ubuntu:22.04
29+
steps:
30+
- uses: actions/checkout@v3
31+
- name: Set up container
32+
env:
33+
DEBIAN_FRONTEND: noninteractive
34+
run: |
35+
apt-get update -q
36+
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
37+
locale-gen en_US.UTF-8
38+
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
39+
- name: Install dependencies
40+
env:
41+
DEBIAN_FRONTEND: noninteractive
42+
run: |
43+
add-apt-repository -y universe
44+
add-apt-repository -y ppa:deadsnakes/ppa
45+
add-apt-repository -y ppa:gift/dev
46+
apt-get update -q
47+
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools python3-yaml
48+
- name: Install tox
49+
run: |
50+
python3 -m pip install tox
51+
- name: Run tests
52+
env:
53+
LANG: en_US.UTF-8
54+
run: |
55+
tox -e${{ matrix.toxenv }}
56+
coverage:
57+
runs-on: ubuntu-latest
58+
strategy:
59+
matrix:
60+
include:
61+
- python-version: '3.8'
62+
toxenv: 'py38,coverage'
63+
container:
64+
image: ubuntu:22.04
65+
steps:
66+
- uses: actions/checkout@v3
67+
- name: Set up container
68+
env:
69+
DEBIAN_FRONTEND: noninteractive
70+
run: |
71+
apt-get update -q
72+
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
73+
locale-gen en_US.UTF-8
74+
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
75+
- name: Install dependencies
76+
env:
77+
DEBIAN_FRONTEND: noninteractive
78+
run: |
79+
add-apt-repository -y universe
80+
add-apt-repository -y ppa:deadsnakes/ppa
81+
add-apt-repository -y ppa:gift/dev
82+
apt-get update -q
83+
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools python3-yaml
84+
- name: Install tox
85+
run: |
86+
python3 -m pip install tox
87+
- name: Run tests with coverage
88+
env:
89+
LANG: en_US.UTF-8
90+
run: |
91+
tox -e${{ matrix.toxenv }}
92+
- name: Upload coverage report to Codecov
93+
uses: codecov/codecov-action@v3
94+
lint:
95+
runs-on: ubuntu-latest
96+
strategy:
97+
matrix:
98+
include:
2799
- python-version: '3.11'
28100
toxenv: 'lint'
29101
container:
30102
image: ubuntu:22.04
31103
steps:
32-
- uses: actions/checkout@v2
104+
- uses: actions/checkout@v3
33105
- name: Set up container
34106
env:
35107
DEBIAN_FRONTEND: noninteractive
@@ -46,15 +118,11 @@ jobs:
46118
add-apt-repository -y ppa:deadsnakes/ppa
47119
add-apt-repository -y ppa:gift/dev
48120
apt-get update -q
49-
apt-get install -y build-essential curl git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools python3-yaml
121+
apt-get install -y build-essential git libffi-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv python3-distutils python3-pip python3-setuptools python3-yaml
50122
- name: Install tox
51123
run: |
52124
python3 -m pip install tox
53-
- name: Download Codecov Uploader
54-
run: |
55-
curl -Os https://uploader.codecov.io/latest/linux/codecov
56-
chmod +x codecov
57-
- name: Run tests
125+
- name: Run linter
58126
env:
59127
LANG: en_US.UTF-8
60128
run: |

tox.ini

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,7 @@ commands =
1818
py3{7,8,9,10,11}: ./run_tests.py
1919
coverage: coverage erase
2020
coverage: coverage run --source=artifacts --omit="*_test*,*__init__*,*test_lib*" run_tests.py
21-
22-
[testenv:codecov]
23-
skip_install = True
24-
allowlist_externals =
25-
./codecov
26-
passenv =
27-
CFLAGS
28-
CPPFLAGS
29-
GITHUB_ACTION
30-
GITHUB_HEAD_REF
31-
GITHUB_REF
32-
GITHUB_REPOSITORY
33-
GITHUB_RUN_ID
34-
GITHUB_SHA
35-
LDFLAGS
36-
commands =
37-
./codecov
21+
coverage: coverage xml
3822

3923
[testenv:docs]
4024
usedevelop = True

0 commit comments

Comments
 (0)