Skip to content

edge_model_serving CI on branch >> 45/merge << #112

edge_model_serving CI on branch >> 45/merge <<

edge_model_serving CI on branch >> 45/merge << #112

name: CI edge_model_serving
run-name: edge_model_serving CI on branch >> ${{ github.ref_name }} <<
on:
push:
branches:
- main
pull_request:
paths:
- 'edge_model_serving/**'
jobs:
lint_and_test_on_edge_model_serving:
name: Run Python linter and tests (unit > integration > functional)
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [ "3.8", "3.9" ] # TODO: add 3.10 and 3.11
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: make install_tflite_linux
working-directory: ./edge_model_serving/tflite_serving
- name: Lint with flake8 and black
run: make lint
working-directory: ./edge_model_serving/tflite_serving
- name: Run unit tests
run: make tflite_tests
working-directory: ./edge_model_serving/tflite_serving
- name: Upload unit test report
uses: dorny/test-reporter@v1
if: ${{ always() }}
with:
name: Unit tests report in Python ${{ matrix.python-version }}
path: edge_model_serving/tflite_serving/reports/tests-report.xml
reporter: java-junit
build_and_push_images:
needs: lint_and_test_on_edge_model_serving
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./edge_model_serving/tflite_serving/Dockerfile
image: ghcr.io/${{ github.repository }}/edge_tflite_serving
context: ./edge_model_serving
- dockerfile: ./edge_model_serving/tf_serving/Dockerfile
image: ghcr.io/${{ github.repository }}/edge_model_serving
context: ./edge_model_serving
uses: ./.github/workflows/template_build_and_push_docker_images.yml
with:
context: ${{ matrix.context }}
dockerfile: ${{ matrix.dockerfile }}
image: ${{ matrix.image }}
secrets:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
build_and_push_arm_images:
needs: lint_and_test_on_edge_model_serving
strategy:
fail-fast: false
matrix:
include:
- dockerfile: ./edge_model_serving/tflite_serving/Dockerfile.raspberrypi
image: ghcr.io/${{ github.repository }}/edge_tflite_serving.raspberrypi
context: ./edge_model_serving
- dockerfile: ./edge_model_serving/tf_serving/Dockerfile.raspberrypi
image: ghcr.io/${{ github.repository }}/edge_model_serving.raspberrypi
context: ./edge_model_serving
uses: ./.github/workflows/template_build_and_push_docker_images.yml
with:
context: ${{ matrix.context }}
dockerfile: ${{ matrix.dockerfile }}
image: ${{ matrix.image }}
arm_build: true
secrets:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}