Debian Codegraph @

.github/workflows/test_tox.yml

raw
1 # Run tox tests on Ubuntu Docker images using GIFT PPA
2 name: test_tox
3 on:
4 pull_request:
5 branches:
6 - main
7 push:
8 branches:
9 - main
10 permissions: read-all
11 jobs:
12 build:
13 runs-on: ubuntu-latest
14 strategy:
15 matrix:
16 include:
17 - python-version: '3.10'
18 toxenv: 'py310,wheel'
19 - python-version: '3.11'
20 toxenv: 'py311,wheel'
21 - python-version: '3.12'
22 toxenv: 'py312,wheel'
23 - python-version: '3.13'
24 toxenv: 'py313,wheel'
25 - python-version: '3.14'
26 toxenv: 'py314,wheel'
27 container:
28 image: ubuntu:24.04
29 steps:
30 - uses: actions/checkout@v4
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 pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-dtfabric python3-pip python3-setuptools python3-yaml tox
48 - name: Run tests
49 env:
50 LANG: en_US.UTF-8
51 run: |
52 tox -e${{ matrix.toxenv }}
53 coverage:
54 runs-on: ubuntu-latest
55 strategy:
56 matrix:
57 include:
58 - python-version: '3.12'
59 toxenv: 'coverage'
60 container:
61 image: ubuntu:24.04
62 steps:
63 - uses: actions/checkout@v4
64 - name: Set up container
65 env:
66 DEBIAN_FRONTEND: noninteractive
67 run: |
68 apt-get update -q
69 apt-get install -y libterm-readline-gnu-perl locales software-properties-common
70 locale-gen en_US.UTF-8
71 ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
72 - name: Install dependencies
73 env:
74 DEBIAN_FRONTEND: noninteractive
75 run: |
76 add-apt-repository -y universe
77 add-apt-repository -y ppa:deadsnakes/ppa
78 add-apt-repository -y ppa:gift/dev
79 apt-get update -q
80 apt-get install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-dtfabric python3-pip python3-setuptools python3-yaml tox
81 - name: Run tests with coverage
82 env:
83 LANG: en_US.UTF-8
84 run: |
85 tox -e${{ matrix.toxenv }}
86 - name: Upload coverage report to Codecov
87 uses: codecov/codecov-action@v4
88 with:
89 token: ${{ secrets.CODECOV_TOKEN }}
90 lint:
91 runs-on: ubuntu-latest
92 strategy:
93 matrix:
94 include:
95 - python-version: '3.12'
96 toxenv: 'lint'
97 container:
98 image: ubuntu:24.04
99 steps:
100 - uses: actions/checkout@v4
101 - name: Set up container
102 env:
103 DEBIAN_FRONTEND: noninteractive
104 run: |
105 apt-get update -q
106 apt-get install -y libterm-readline-gnu-perl locales software-properties-common
107 locale-gen en_US.UTF-8
108 ln -f -s /usr/share/zoneinfo/UTC /etc/localtime
109 - name: Install dependencies
110 env:
111 DEBIAN_FRONTEND: noninteractive
112 run: |
113 add-apt-repository -y universe
114 add-apt-repository -y ppa:deadsnakes/ppa
115 add-apt-repository -y ppa:gift/dev
116 apt-get update -q
117 apt-get install -y build-essential git pkg-config python${{ matrix.python-version }} python${{ matrix.python-version }}-dev python${{ matrix.python-version }}-venv libcreg-python3 libregf-python3 python3-dfdatetime python3-dtfabric python3-pip python3-setuptools python3-yaml tox
118 - name: Run linter
119 env:
120 LANG: en_US.UTF-8
121 run: |
122 tox -e${{ matrix.toxenv }}