File tree Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Expand file tree Collapse file tree 2 files changed +36
-1
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ name : " Run Unit Tests"
3+ on :
4+ pull_request :
5+ branches :
6+ - main
7+ jobs :
8+ unit-tests :
9+ runs-on : ubuntu-latest
10+ strategy :
11+ matrix :
12+ infrahub-version : [1.0, stable, latest]
13+ steps :
14+ - name : " Check out repository code"
15+ uses : " actions/checkout@v4"
16+ - name : " Set up Python"
17+ uses : " actions/setup-python@v5"
18+ with :
19+ python-version : " 3.12"
20+ - name : " Setup environment"
21+ run : |
22+ pipx install poetry
23+ - name : " Install dependencies"
24+ run : |
25+ poetry install
26+ - name : " Launch Infrahub"
27+ run : |
28+ curl https://infrahub.opsmill.io/${ matrix.infrahub-version } | sudo docker compose -f up -d
29+ - name : " Wait for Infrahub to become accessible"
30+ uses : iFaxity/wait-on-action
31+ with :
32+ resource : http://localhost:8000
33+ - name : " Run Pytest"
34+ run : |
35+ pytest
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ interface {{ intf.node.name.value }}
3737{% else %}
3838 description role: {{ intf.node.role.value }}
3939{% endif %}
40- {% if intf .node ["mtu" ]["value" ] %}
40+ {% if "mtu" in intf . node and intf .node ["mtu" ]["value" ] %}
4141 mtu {{ intf.node["mtu"] ["value"] }}
4242{% endif %}
4343{% if not intf .node ["enabled" ]["value" ] %}
You can’t perform that action at this time.
0 commit comments