Skip to content

Commit

Permalink
ci: modified to run ubuntu and windows tests using the same job
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigomelo9 committed Sep 7, 2024
1 parent 6dc528a commit fcd51f6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 27 deletions.
39 changes: 14 additions & 25 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,25 @@ on:
push:

jobs:
test-lin:
test:
strategy:
matrix:
os: ['ubuntu']
pyver: ['3.8', '3.9', '3.10', '3.11', '3.12']
os: [ubuntu, windows]
pyver: [3.8, 3.9, 3.10, 3.11, 3.12]
exclude:
- os: windows
pyver: 3.8
- os: windows
pyver: 3.9
- os: windows
pyver: 3.10
- os: windows
pyver: 3.11
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os }} | ${{ matrix.pyver }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Set up Python ${{ matrix.pyver }}
uses: actions/setup-python@v5
with:
Expand All @@ -25,22 +31,5 @@ jobs:
run: pip install . && pip install pytest
- name: Run tests
run: |
source tests/mocks/source-me.sh && make test
cd examples/projects && bash regress.sh
test-win:
runs-on: windows-latest
name: windows | 3.12
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: pip install . && pip install pytest
- name: Run tests
run: make test
make test
cd examples/projects && bash regress.sh --notool
4 changes: 2 additions & 2 deletions tests/test_tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def generate(tool, part):
prj.add_hook('postbit', 'HOOK16')
try:
prj.make()
except Exception:
except RuntimeError:
pass
try:
prj.prog()
except Exception:
except RuntimeError:
pass

0 comments on commit fcd51f6

Please sign in to comment.