Skip to content

[pre-commit.ci] pre-commit autoupdate #53

[pre-commit.ci] pre-commit autoupdate

[pre-commit.ci] pre-commit autoupdate #53

Workflow file for this run

# Copyright (c) 2024 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
---
name: Test Runner Unit Tests
on:
push: null
permissions: read-all
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
unit-test:
runs-on: [ k8-runners ]
steps:
- uses: step-security/harden-runner@v2
with:
egress-policy: audit
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ${{ secrets.REGISTRY }}
username: ${{ secrets.REGISTRY_USER }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Install requirements
run: |
sudo apt-get update -y
sudo apt-get install python3.8-venv -y
python -m venv venv
source venv/bin/activate
venv/bin/python -m pip install pytest hypothesis
venv/bin/python -m pip install -r requirements.txt
working-directory: ${{ github.workspace }}/test-runner
- name: Unit Test
run: venv/bin/python -m pytest tests/utest.py -W ignore::UserWarning
working-directory: ${{ github.workspace }}/test-runner
env:
REGISTRY: ${{ secrets.REGISTRY }}