-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (64 loc) · 2.24 KB
/
pulls.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Pulls
on: pull_request
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['2.7']
tox_env: ['py27']
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install tox
tox -e ${{ matrix.tox_env }} --notest
- name: Run
run: |
tox -e ${{ matrix.tox_env }} -- --nocapture
lint:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: [ '2.7' ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install tox
tox -r -e pep8 --notest
- name: lint
run: |
tox -e pep8
docker-build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['2.7']
tox_env: ['py27']
steps:
- uses: actions/checkout@v3
- name: docker build
run: |
docker build . -t internap/netman:latest
- name: docker verify
run: |
docker compose up -d
docker inspect -f {{.State.Running}} netman-tsr1.yul1.example.net-1
docker inspect -f {{.State.Running}} netman-netman-1
while [[ $(docker inspect -f {{.State.Health.Status}} netman-netman-1) != "healthy" ]]; do echo "Container is" $(docker inspect -f {{.State.Health.Status}} netman-netman-1); sleep 1; done;
curl --fail -vvv -X POST http://localhost:32771/switches/netman-tsr1.yul1.example.net-1/vlans -d '{"number": 1000, "name": "myvlan"}' -H 'Content-Type: application/json' -H 'Netman-model: cisco' -H 'Netman-username: root' -H 'Netman-password: root'