Skip to content

Commit 7020da1

Browse files
committed
Dev: workflows: Run unit test with python container
As ubuntu-24.04 not support python3.6 directly, to keep consistency, we use python container to run unit test for all python versions.
1 parent 9d8cb00 commit 7020da1

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

.github/workflows/crmsh-ci.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,17 +37,14 @@ jobs:
3737
timeout-minutes: 5
3838
steps:
3939
- uses: actions/checkout@v4
40-
- name: Set up Python
41-
uses: actions/setup-python@v4
42-
with:
43-
python-version: ${{ matrix.python-version }}
44-
- name: Install dependencies
45-
run: |
46-
python -m pip install --upgrade pip
47-
pip install tox
48-
- name: Test with pytest in tox
40+
- name: Run unit tests in Python container
4941
run: |
42+
docker run --rm -v ${{ github.workspace }}:/app -w /app python:${{ matrix.python-version }} bash -c "
43+
python -m pip install --upgrade pip &&
44+
pip install tox &&
5045
tox -v -e${{ matrix.python-version }}
46+
"
47+
5148
- uses: codecov/codecov-action@v4
5249
with:
5350
token: ${{ secrets.CODECOV_TOKEN }}

0 commit comments

Comments
 (0)