Skip to content

Commit 30724a0

Browse files
[CI] Updated Install Depenedencies for Format Tests
Explicitly installed the apt packages required for the tests and the python requirements. In the future, we should update the version of pylint and black used by the CI to allow us to use a more up to date version of Python for linting. It looks like linting has to be done on CI which is not ideal.
1 parent a8e0002 commit 30724a0

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

.github/workflows/test.yml

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -122,27 +122,42 @@ jobs:
122122
fail-fast: false
123123
matrix:
124124
include:
125-
- { name: 'C/C++', script: 'check-format.sh' }
126-
- { name: 'Python', script: 'check-format-py.sh' }
127-
- { name: 'Python Lint', script: 'pylint_check.py' }
125+
- { name: 'C/C++', script: 'check-format.sh' , with_python: 'no', pkgs: 'clang-format-18' }
126+
- { name: 'Python', script: 'check-format-py.sh', with_python: 'yes', pkgs: '' }
127+
- { name: 'Python Lint', script: 'pylint_check.py' , with_python: 'yes', pkgs: '' }
128128
name: 'F: ${{ matrix.name }}'
129129
steps:
130130

131+
- uses: actions/checkout@v4
132+
# NOTE: We do not need sub-modules. We do not check sub-modules for formatting.
133+
131134
# TODO: This should be on the same version of Python as would be found on
132135
# Ubuntu 24.04 (3.12.3); however that version has some linting errors.
136+
# - The version of Pylint in requirements.txt is not compatible with
137+
# python version 3.12.3. Pylint needs to be updated to move to this version.
133138
- uses: actions/setup-python@v5
139+
if: ${{ matrix.with_python == 'yes' }}
134140
with:
135141
python-version: 3.10.10
136142

137-
- uses: actions/checkout@v4
138-
with:
139-
submodules: 'true'
143+
- name: Build Python Virtual Env
144+
run: |
145+
python -m venv .venv
146+
147+
- name: Install Python Requirements
148+
if: ${{ matrix.with_python == 'yes' }}
149+
run: |
150+
source .venv/bin/activate
151+
pip install -r requirements.txt
140152
141153
- name: Install dependencies
142-
run: ./.github/scripts/install_dependencies.sh
154+
if: ${{ matrix.pkgs }}
155+
run: sudo apt install -y ${{ matrix.pkgs }}
143156

144157
- name: Test
145-
run: ./dev/${{ matrix.script }}
158+
run: |
159+
source .venv/bin/activate
160+
./dev/${{ matrix.script }}
146161
147162
148163
VerifyTestSuites:

0 commit comments

Comments
 (0)