forked from twosixlabs/armory
-
Notifications
You must be signed in to change notification settings - Fork 0
168 lines (163 loc) · 5.39 KB
/
ci_test.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
---
name: GitHub CI
on:
push:
branches:
- master
pull_request:
branches:
- master
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
jobs:
pytest-host:
name: PyTest Host
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: ['ubuntu-18.04', 'windows-latest', 'macos-latest']
python-version: ['3.6']
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Run armory host tests
shell: bash
run: |
pip install -r requirements.txt
pip install -r test-requirements.txt
pytest -s ./tests/test_host/
pytest-tf1:
name: PyTest TF1
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory TF1 docker tests
run: |
pip install -r requirements.txt
version=$(python -m armory --version)
bash docker/build-dev.sh tf1
docker run -w /armory_dev twosixarmory/tf1:${version} pytest -s ./tests/test_docker
docker run -w /armory_dev twosixarmory/tf1:${version} pytest -s ./tests/test_tf1
docker run -w /armory_dev twosixarmory/tf1:${version} python \
/opt/conda/lib/python3.7/site-packages/object_detection/builders/model_builder_tf1_test.py
armory-tf1:
name: Armory run tests TF1
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory TF1 scenarios
run: |
pip install -r requirements.txt
bash docker/build-dev.sh tf1
python -m armory run tests/scenarios/tf1/image_classification.json
pytest-tf2:
name: PyTest TF2
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory TF2 docker tests
run: |
pip install -r requirements.txt
version=$(python -m armory --version)
bash docker/build-dev.sh tf2
docker run -w /armory_dev twosixarmory/tf2:${version} pytest -s ./tests/test_docker
docker run -w /armory_dev twosixarmory/tf2:${version} pytest -s ./tests/test_tf2
docker run -w /armory_dev twosixarmory/tf2:${version} python \
/opt/conda/lib/python3.7/site-packages/object_detection/builders/model_builder_tf2_test.py
pytest-pytorch:
name: PyTest PyTorch
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory PyTorch docker tests
run: |
pip install -r requirements.txt
version=$(python -m armory --version)
bash docker/build-dev.sh pytorch
docker run -w /armory_dev twosixarmory/pytorch:${version} pytest -s ./tests/test_docker
docker run -w /armory_dev twosixarmory/pytorch:${version} pytest -s ./tests/test_pytorch
armory-pytorch:
name: Armory run tests PyTorch
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory Pytorch scenarios
run: |
pip install -r requirements.txt
bash docker/build-dev.sh pytorch
python -m armory run tests/scenarios/pytorch/image_classification.json
armory-no-docker:
name: Armory test without docker
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: '3.6'
- name: Run armory test without docker
run: |
pip install -r requirements.txt
version=$(python -m armory --version)
bash docker/build-dev.sh tf1
docker run -w /armory_dev twosixarmory/tf1:${version} python -m armory \
run --no-docker tests/scenarios/tf1/image_classification.json
bash docker/build-dev.sh pytorch
docker run -w /armory_dev twosixarmory/pytorch:${version} python -m armory \
run --no-docker tests/scenarios/pytorch/image_classification.json
flake8-test:
name: Flake8
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: install flake8
run: pip install flake8
- name: Run flake8
run: flake8
black-test:
name: Black code format
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: install black
run: pip install black==19.10b0
- name: Ensure contributor used ("black ./") before commit
run: black --check ./
yamllint-test:
name: Yamllint
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: install yamllint
run: pip install yamllint
- name: Run yamllint
run: yamllint --no-warnings ./
json-format-test:
name: JSON file format
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- name: Ensure contributor used ("python -m tools.format_json") before commit
run: python -m tools.format_json --check