-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.25 KB
/
python-app.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
43
44
45
46
47
48
49
50
51
# This workflow will run unit test.
name: unit test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
permissions:
contents: read
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Set up virtual environment
run: |
python -m venv venv
source venv/bin/activate
- name: Install dependencies
run: |
source venv/bin/activate
pip install -e .
- name: Linting
run: |
source venv/bin/activate
flake8 ./
- name: unit test
run: |
source venv/bin/activate
pytest tests
- name: run linear_toy_demo
run: |
source venv/bin/activate
python examples/linear_toy/linear_toy_demo.py
- name: run linear_toy_w_input_limits_demo
run: |
source venv/bin/activate
python examples/linear_toy/linear_toy_w_input_limits_demo.py
- name: run nonlinear_toy_demo
run: |
source venv/bin/activate
python examples/nonlinear_toy/demo.py
- name: run nonlinear toy demo_trigpoly
run: |
source venv/bin/activate
python examples/nonlinear_toy/demo_trigpoly.py --unit_test