-
Notifications
You must be signed in to change notification settings - Fork 218
76 lines (68 loc) · 3.03 KB
/
pytest-vctl.yml
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
---
# This workflow is meant as a foundational workflow for running integration/unit tests on multiple targeted
# ubuntu versions with multiple python versions.
#
# This workflow utilizes the build-dependency-cache workflow which sets up the environment dependencies using
# bootstrap.py --all
#
# Documentation for the syntax of this file is located
# https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions
# The workflow name will show up in the action tab on github during execution
# https://github.com/VOLTTRON/volttron/actions (or if you are pushing to your own fork change the user)
name: Testing volttron-ctl
# Determine what events are going to trigger a running of the workflow
on:
workflow_dispatch:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
# The job named build
build:
# The strategy allows customization of the build and allows matrixing the version of os and software
# https://docs.github.com/en/free-pro-team@l.atest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstrategy
strategy:
fail-fast: false
matrix:
# Each entry in the os and python-version matrix will be run so for the 3 x 4 there will be 12 jobs run
os: [ ubuntu-20.04 ]
python-version: [ 3.8 ]
# Run-on determines the operating system available to run on
# - At the current time there is only ubuntu machines between 16.04 and 20.04 available
# - This uses the matrix os from the strategy above
runs-on: ${{ matrix.os }}
# Each step will be run in order of listing.
steps:
# checkout the volttron repository and set current directory to it
- uses: actions/checkout@v4
# Attempt to restore the cache from the build-dependency-cache workflow if present then
# the output value steps.check_files.outputs.files_exists will be set (see the next step for usage)
- name: Set up Python ${{matrix.os}} ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
# Run the specified tests and save the results to a unique file that can be archived for later analysis.
- name: Run pytest on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/control_tests
test_output_suffix: control_tests
# Archive the results from the pytest to storage.
- name: Archive test results
uses: actions/upload-artifact@v4
if: always()
with:
name: pytest-report
# should match test-<test_output_suffix>- ...
path: output/test-control_tests-${{matrix.os}}-${{ matrix.python-version }}-results.xml