-
Notifications
You must be signed in to change notification settings - Fork 0
83 lines (68 loc) · 2.31 KB
/
modelconverter_test.yaml
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
name: Integration tests for ModelConverter
on:
workflow_call:
inputs:
package:
required: true
type: string
description: Which package to test
version:
required: true
type: string
description: >
Which version of underlying conversion tools to use
permissions:
contents: read
packages: read
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_S3_ENDPOINT_URL: ${{ secrets.AWS_S3_ENDPOINT_URL }}
PACKAGE: ${{ inputs.package }}
VERSION: ${{ inputs.version }}
jobs:
tests:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker
uses: crazy-max/ghaction-setup-docker@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.8'
cache: pip
- name: Install dependencies
run: pip install -e .[dev] --extra-index-url https://artifacts.luxonis.com/artifactory/luxonis-python-release-local/
- name: Authenticate to Google Cloud
id: google-auth
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_CREDENTIALS }}
token_format: access_token
- name: Download build files from GCS
if: ${{ inputs.package }} != hailo
env:
GS_BUILD_ARTIFACTS: gs://luxonis-test-bucket/modelconverter/build-artifacts
run: |
mkdir -p docker/extra_packages
cd docker/extra_packages
if [ "${PACKAGE}" = "rvc4" ]; then
gcloud storage cp \
"${GS_BUILD_ARTIFACTS}/snpe-${VERSION}.zip" \
"snpe-${VERSION}.zip"
elif [ "${PACKAGE}" = "rvc2" ] || [ "${PACKAGE}" = "rvc3" ]; then
gcloud storage cp \
"${GS_BUILD_ARTIFACTS}/openvino-${VERSION}.tar.gz" \
"openvino-${VERSION}.tar.gz"
fi
- name: Run Tests
run: |
pytest -s --verbose "tests/test_packages/test_${PACKAGE}.py" --tool-version "${VERSION}"