|
1 | 1 | name: test_accuracy |
2 | 2 | permissions: read-all |
3 | | -on: pull_request |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + merge_group: |
| 6 | + branches: |
| 7 | + - master |
4 | 8 | concurrency: |
5 | 9 | group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} |
6 | 10 | cancel-in-progress: true |
7 | 11 | jobs: |
8 | 12 | test_accuracy: |
9 | 13 | runs-on: ubuntu-latest |
10 | 14 | steps: |
11 | | - - uses: actions/checkout@v3 |
12 | | - - uses: actions/setup-python@v4 |
13 | | - with: |
14 | | - python-version: 3.9 |
15 | | - cache: pip |
16 | | - - name: Create and start a virtual environment |
17 | | - run: | |
18 | | - python -m venv venv |
19 | | - source venv/bin/activate |
20 | | - - name: Install dependencies |
21 | | - run: | |
22 | | - source venv/bin/activate |
23 | | - python -m pip install --upgrade pip |
24 | | - pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu |
25 | | - - name: Prepare test data |
26 | | - run: | |
27 | | - source venv/bin/activate |
28 | | - python tests/python/accuracy/prepare_data.py -d data |
29 | | - - name: Run Python Test |
30 | | - run: | |
31 | | - source venv/bin/activate |
32 | | - pytest --data=./data tests/python/accuracy/test_accuracy.py |
33 | | - DATA=data pytest --data=./data tests/python/accuracy/test_YOLOv8.py |
34 | | - - name: Install CPP ependencies |
35 | | - run: | |
36 | | - sudo bash model_api/cpp/install_dependencies.sh |
37 | | - - name: Build CPP Test |
38 | | - run: | |
39 | | - mkdir build && cd build |
40 | | - cmake ../tests/cpp/accuracy/ -DCMAKE_CXX_FLAGS=-Werror |
41 | | - make -j |
42 | | - - name: Run CPP Test |
43 | | - run: | |
44 | | - build/test_accuracy -d data -p tests/python/accuracy/public_scope.json |
45 | | - DATA=data build/test_YOLOv8 |
| 15 | + - uses: actions/checkout@v3 |
| 16 | + - uses: actions/setup-python@v4 |
| 17 | + with: |
| 18 | + python-version: 3.9 |
| 19 | + cache: pip |
| 20 | + - name: Create and start a virtual environment |
| 21 | + run: | |
| 22 | + python -m venv venv |
| 23 | + source venv/bin/activate |
| 24 | + - name: Install dependencies |
| 25 | + run: | |
| 26 | + source venv/bin/activate |
| 27 | + python -m pip install --upgrade pip |
| 28 | + pip install model_api/python/[tests] --extra-index-url https://download.pytorch.org/whl/cpu |
| 29 | + - name: Prepare test data |
| 30 | + run: | |
| 31 | + source venv/bin/activate |
| 32 | + python tests/python/accuracy/prepare_data.py -d data |
| 33 | + - name: Run Python Test |
| 34 | + run: | |
| 35 | + source venv/bin/activate |
| 36 | + pytest --data=./data tests/python/accuracy/test_accuracy.py |
| 37 | + DATA=data pytest --data=./data tests/python/accuracy/test_YOLOv8.py |
| 38 | + - name: Install CPP ependencies |
| 39 | + run: | |
| 40 | + sudo bash model_api/cpp/install_dependencies.sh |
| 41 | + - name: Build CPP Test |
| 42 | + run: | |
| 43 | + mkdir build && cd build |
| 44 | + cmake ../tests/cpp/accuracy/ -DCMAKE_CXX_FLAGS=-Werror |
| 45 | + make -j |
| 46 | + - name: Run CPP Test |
| 47 | + run: | |
| 48 | + build/test_accuracy -d data -p tests/python/accuracy/public_scope.json |
| 49 | + DATA=data build/test_YOLOv8 |
0 commit comments