Skip to content

feat: pipeline to create releases with patches #484

feat: pipeline to create releases with patches

feat: pipeline to create releases with patches #484

Workflow file for this run

name: Test suites
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
python-unit-tests:
name: Tests renderer
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install poetry
run: pipx install poetry
- name: Setup poetry
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "poetry"
- name: Install python dependencies
run: poetry install --with dev,test
- name: Run python linter
run: poetry run ruff check render_templates
if: ${{ !cancelled() }}
- name: Run python formatter
run: poetry run ruff format --check render_templates
if: ${{ !cancelled() }}
- name: Run tests and coverage
run: poetry run pytest render_templates
if: ${{ !cancelled() }}
Linter:
name: Run linters
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
flavor: ["armnn", "cpu", "cuda", "noml", "openvino"]
steps:
- uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install poetry
run: pipx install poetry
- name: Setup poetry
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: "poetry"
- name: Install python dependencies
run: poetry install --without dev,test
- name: Create Dockerfile from template
run: poetry run python3 render_templates/main.py --flavor ${{ matrix.flavor }}
- name: Run Hadolint
uses: hadolint/[email protected]
if: ${{ !cancelled() }}
with:
dockerfile: build-${{ matrix.flavor }}/Dockerfile
- name: Run ShellCheck
uses: ludeeus/action-shellcheck@master
if: ${{ !cancelled() }}
with:
scandir: build-${{ matrix.flavor }}
additional_files: "run"
- name: Check Permissions
if: ${{ !cancelled() }}
run: |
WRONG_PERM=$(find ./build-${{ matrix.flavor }} -path "./.git" -prune -o \( -name "run" -o -name "finish" -o -name "check" \) -not -perm -u=x,g=x,o=x -print)
if [ -n "${WRONG_PERM}" ]; then
for i in ${WRONG_PERM}; do
echo "::error file=${i},line=1,title=Missing Executable Bit::This file needs to be set as executable!"
done
exit 1
else
echo "**** All perms look good ****"
fi
format:
name: Prettier
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install prettier
run: npm i [email protected]
- name: Run formatter
run: npx prettier --check .