-
Notifications
You must be signed in to change notification settings - Fork 39
133 lines (133 loc) · 4.68 KB
/
test_tox.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# Run tox tests on Ubuntu Docker images using GIFT PPA
name: test_tox
on:
pull_request:
branches:
- main
push:
branches:
- main
permissions: read-all
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.8'
toxenv: 'py38,wheel'
- python-version: '3.9'
toxenv: 'py39,wheel'
- python-version: '3.10'
toxenv: 'py310,wheel'
- python-version: '3.11'
toxenv: 'py311,wheel'
- python-version: '3.12'
toxenv: 'py312,wheel'
- python-version: '3.13'
toxenv: 'py313,wheel'
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v4
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -q
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
locale-gen en_US.UTF-8
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
add-apt-repository -y universe
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential git libsnappy-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libfwps-python3 libfwsi-python3 libgzipf-python3 liblnk-python3 libolecf-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-lz4 python3-pip python3-setuptools python3-snappy python3-yaml python3-zstd
- name: Install tox
run: |
python3 -m pip install tox
- name: Run tests
env:
LANG: en_US.UTF-8
run: |
tox -e${{ matrix.toxenv }}
coverage:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.10'
toxenv: 'coverage'
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v4
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -q
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
locale-gen en_US.UTF-8
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
add-apt-repository -y universe
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential git libsnappy-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libfwps-python3 libfwsi-python3 libgzipf-python3 liblnk-python3 libolecf-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-lz4 python3-pip python3-setuptools python3-snappy python3-yaml python3-zstd
- name: Install tox
run: |
python3 -m pip install tox
- name: Run tests with coverage
env:
LANG: en_US.UTF-8
run: |
tox -e${{ matrix.toxenv }}
- name: Upload coverage report to Codecov
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
lint:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- python-version: '3.12'
toxenv: 'lint'
container:
image: ubuntu:22.04
steps:
- uses: actions/checkout@v4
- name: Set up container
env:
DEBIAN_FRONTEND: noninteractive
run: |
apt-get update -q
apt-get install -y libterm-readline-gnu-perl locales software-properties-common
locale-gen en_US.UTF-8
ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
- name: Install dependencies
env:
DEBIAN_FRONTEND: noninteractive
run: |
add-apt-repository -y universe
add-apt-repository -y ppa:deadsnakes/ppa
add-apt-repository -y ppa:gift/dev
apt-get update -q
apt-get install -y build-essential git libsnappy-dev python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libfwps-python3 libfwsi-python3 libgzipf-python3 liblnk-python3 libolecf-python3 libregf-python3 python3-dfdatetime python3-distutils python3-dtfabric python3-lib2to3 python3-lz4 python3-pip python3-setuptools python3-snappy python3-yaml python3-zstd
- name: Install tox
run: |
python3 -m pip install tox
- name: Run linter
env:
LANG: en_US.UTF-8
run: |
tox -e${{ matrix.toxenv }}