-
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.
- Loading branch information
1 parent
af11cb6
commit 13e0de3
Showing
1 changed file
with
43 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,43 @@ | ||
# SPDX-FileCopyrightText: 2024 David Mallasén Quintana | ||
# SPDX-License-Identifier: LGPL-3.0-or-later | ||
# Source: https://github.com/davidmallasen/arithmetic_units | ||
|
||
name: Cocotb tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
jobs: | ||
cocotb-tests: | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install Icarus Verilog | ||
run: sudo apt-get update && sudo apt-get install -y iverilog | ||
|
||
- name: Set up Conda | ||
uses: conda-incubator/setup-miniconda@v3 | ||
with: | ||
activate-environment: arithmetic_units | ||
environment-file: environment.yml | ||
auto-activate-base: false | ||
|
||
- name: Run pytest | ||
id: run-tests | ||
run: pytest | ||
continue-on-error: true | ||
|
||
- name: Notify user on failure | ||
if: steps.run-tests.outcome == 'failure' | ||
run: | | ||
echo "Pytest has failed. \ | ||
Please check the logs and run 'pytest -rA -v' locally to get a more detailed output." | ||
exit 1 |