forked from open-edge-platform/edge-ai-libraries
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtimeseries-weekly-functional-tests.yaml
More file actions
52 lines (49 loc) · 1.96 KB
/
timeseries-weekly-functional-tests.yaml
File metadata and controls
52 lines (49 loc) · 1.96 KB
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
name: "[Time Series Analytics] Run weekly functional tests"
run-name: "[Time Series Analytics] Run weekly functional tests"
on:
schedule:
- cron: '0 14 * * 5' # 14:00 UTC
workflow_dispatch:
workflow_call:
inputs:
test_pattern:
description: 'Pytest pattern for tests to run (default: all tests)'
required: false
type: string
default: '.'
permissions: {}
jobs:
timeseries-weekly-functional-tests:
name: Weekly-Run TimeSeries Analytics Microservice tests
runs-on: ubuntu-24.04
permissions:
contents: read
packages: read
strategy:
fail-fast: false
steps:
- name: Check out edge-ai-libraries repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run time-series-analytics-microservices function tests
env:
TEST_PATTERN: ${{ inputs.test_pattern || '.' }}
run: |
cd "${{ github.workspace }}"
cd ./microservices/time-series-analytics/tests-functional
curl -sfL https://get.k3s.io | INSTALL_K3S_SELINUX_WARN=true INSTALL_K3S_VERSION=${K3S_VERSION} \
sh -s - --disable=traefik --write-kubeconfig-mode=644
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
echo "Running function tests"
pip3 install -r requirements.txt
rm -rf /tmp/test_report/report.html
pytest -v test_docker.py::test_input_endpoint
source ../docker/.env
docker save ${DOCKER_REGISTRY}${TIME_SERIES_ANALYTICS_IMAGE}:${IMAGE_SUFFIX:-latest}${WEEKLY_BUILD_DATE:+-${WEEKLY_BUILD_DATE}}${WEEKLY_BUILD_DATE:+-weekly} | sudo k3s ctr images import -
pytest -q -vv --self-contained-html --html=/tmp/test_report/report.html ${TEST_PATTERN}
- name: Upload HTML test report to Github
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: function-test-report
path: /tmp/test_report