forked from greatscottgadgets/cynthion
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add CI workflow to test Python code.
- Loading branch information
1 parent
5f19cd0
commit 54bb33c
Showing
1 changed file
with
31 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Python | ||
|
||
on: | ||
push: | ||
pull_request: | ||
# Run automatically every monday | ||
schedule: | ||
- cron: 1 12 * * 1 | ||
|
||
jobs: | ||
build-and-test: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Build and install | ||
run: python -m pip install amaranth_stdio luna_soc cynthion/python | ||
|
||
- name: Run unit tests | ||
run: | | ||
python -m unittest discover -s cynthion/python/tests | ||
python -m cynthion.gateware.analyzer.analyzer |