Skip to content

Commit a4969b9

Browse files
committed
CI: test against all supported Amaranth versions.
1 parent 2be8e79 commit a4969b9

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/main.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,31 @@ name: CI
33
jobs:
44
test:
55
runs-on: ubuntu-latest
6+
strategy:
7+
matrix:
8+
python-version:
9+
- '3.7'
10+
# this version range needs to be synchronized with the one in pyproject.toml
11+
amaranth-version:
12+
- '0.2'
13+
- '0.3'
14+
- 'git'
15+
fail-fast: false
616
steps:
717
- name: Check out source code
818
uses: actions/checkout@v3
919
- name: Set up Python
1020
uses: actions/setup-python@v4
21+
with:
22+
python-version: ${{ matrix.python-version }}
23+
- name: Install Amaranth release
24+
if: ${{ matrix.amaranth-version != 'git' }}
25+
run: |
26+
pip install 'amaranth==${{ matrix.amaranth-version }}'
27+
- name: Install Amaranth from git
28+
if: ${{ matrix.amaranth-version == 'git' }}
29+
run: |
30+
pip install git+https://github.com/amaranth-lang/amaranth.git
1131
- name: Test
1232
run: |
13-
python setup.py test
33+
python -m unittest discover -t . -s amaranth_boards -p '*.py'

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ license = {file = "LICENSE.txt"}
1212

1313
dependencies = [
1414
"importlib_metadata; python_version<'3.8'",
15+
# this version requirement needs to be synchronized with the one in .github/workflows/main.yml
1516
"amaranth>=0.2,<0.5",
1617
]
1718

0 commit comments

Comments
 (0)