Skip to content

Commit

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

jobs:
test-lin:
test:
strategy:
matrix:
os: ['ubuntu']
os: ['ubuntu', 'windows']
pyver: ['3.8', '3.9', '3.10', '3.11', '3.12']
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.os }} | ${{ matrix.pyver }}
# exclude:
# os: ['windows']
# pyver: ['3.8', '3.9', '3.10', '3.11']
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 +25,30 @@ 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
# source tests/mocks/source-me.sh && make test
# cd examples/projects && bash regress.sh
# test-win:
# strategy:
# matrix:
# os: ['windows']
# pyver: ['3.12']
# runs-on: ${{ matrix.os }}-latest
# name: ${{ matrix.os }} | ${{ matrix.pyver }}
# steps:
# - name: Checkout repository
# uses: actions/checkout@v4
# - name: Set up Python ${{ matrix.pyver }}
# uses: actions/setup-python@v5
# with:
# python-version: ${{ matrix.pyver }}
# - name: Install dependencies
# run: pip install . && pip install pytest
# - name: Run tests
# run: |
# source tests/mocks/source-me.sh && make test
# cd examples/projects && bash regress.sh

# $Env:PATH += ";${{ github.workspace }}\tests\mocks"
# cd examples\projects && python3 vivado.py
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 aa35d6f

Please sign in to comment.