-
Notifications
You must be signed in to change notification settings - Fork 110
42 lines (39 loc) · 1.08 KB
/
test_python_api.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Lint and Test Python API
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python
on:
pull_request:
paths:
- 'openfasoc/common/**'
- 'openfasoc/generators/common/**'
- 'tests/**'
- 'requirements.txt'
- 'pytest.ini'
push:
schedule:
- cron: 0 2 * * * # run at 2 AM UTC
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
python-version: ["3.10", "3.11", "3.12"]
os: [ubuntu-latest]
steps:
- name: Cancel Workflow Action
uses: styfle/[email protected]
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt install -y ngspice
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install pytest
# pip install .
- name: Test with pytest
run: pytest