Skip to content

Commit

Permalink
Fix gh-workflow for Python unit-tests (#505)
Browse files Browse the repository at this point in the history
Signed-off-by: Ahmed Hussein (amahussein) <[email protected]>

Fixes #504
  • Loading branch information
amahussein authored Aug 22, 2023
1 parent 5ef39b8 commit 037fa23
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 12 deletions.
27 changes: 15 additions & 12 deletions .github/workflows/python-unit-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,23 @@ on:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install --pre tox-gh-actions
- name: Install tox
run: |
python -m pip install --upgrade pip
python -m pip install tox
python -m pip install --pre tox-gh-actions
- name: Run tox test
run: cd user_tools && tox -e pylint,flake8,python3.8 -- tests/test_diagnostic.py
- name: Run tox test
run: cd user_tools && tox
6 changes: 6 additions & 0 deletions user_tools/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@ envlist =
flake8
isolated_build = True

[gh-actions]
python =
3.8: python3.8, pylint, flake8
3.9: python3.9, pylint, flake8
3.10: python3.10, pylint, flake8

[testenv]
deps =
pytest-cov
Expand Down

0 comments on commit 037fa23

Please sign in to comment.