Skip to content

Commit

Permalink
Merge pull request #2776 from VOLTTRON/releases/8.1
Browse files Browse the repository at this point in the history
Releases/8.1 to main
  • Loading branch information
craig8 authored Sep 2, 2021
2 parents 997c55c + b375006 commit efe6ec9
Show file tree
Hide file tree
Showing 328 changed files with 13,244 additions and 7,966 deletions.
2 changes: 2 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Handles CLRF/RF EOL issue
* text=auto
36 changes: 9 additions & 27 deletions .github/workflows/pytest-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
name: Testing platform auth

# Determine what events are going to trigger a running of the workflow
on: [push, pull_request]
on: [pull_request]

jobs:
# The job named build
Expand All @@ -25,7 +25,7 @@ jobs:
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-16.04, ubuntu-18.04, ubuntu-20.04 ]
os: [ ubuntu-18.04, ubuntu-20.04 ]
python-version: [ 3.6, 3.7] # , 3.8, 3.9 ]

# Run-on determines the operating system available to run on
Expand All @@ -44,32 +44,14 @@ jobs:
with:
python-version: ${{ matrix.python-version }}

# 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: Has restored cache
id: check_files
uses: andstor/file-existence-action@v1
with:
files: "env/bin/activate"

# This step is only run if the cache wasn't able to be restored.
- name: Install dependencies
if: steps.check_files.outputs.files_exists != 'true'
run: |
pip install wheel
python bootstrap.py --all --force
- name: Install volttron
run: |
source env/bin/activate
pip install -e .
# Run the specified tests and save the results to a unique file that can be archived for later analysis.
- name: Run pytest
run: |
source env/bin/activate
pip install -e .
pytest volttrontesting/platform/auth_tests -rf -o junit_family=xunit2 --junitxml=output/test-auth-${{matrix.os}}-${{ matrix.python-version }}-results.xml
- name: Run pytest on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v2
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/auth_tests
test_output_suffix: auth

# Archive the results from the pytest to storage.
- name: Archive test results
Expand Down
78 changes: 78 additions & 0 deletions .github/workflows/pytest-dbutils-backup_db.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
---
# 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 BackupDatabase

# Determine what events are going to trigger a running of the workflow
on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- main
- develop
- releases/**

jobs:
build:
env:
TEST_FILE: volttrontesting/platform/dbutils/test_backup_database.py

# The strategy allows customization of the build and allows matrixing the version of os and software
# https://docs.github.com/en/[email protected]/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. For example, on a list of 3 os's and 4 python versions, 12 jobs will be run
os: [ ubuntu-18.04, ubuntu-20.04 ]
python-version: [ 3.6, 3.7] # , 3.8, 3.9 ]

# 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 }}

steps:
# checkout the volttron repository and set current directory to it
- uses: actions/checkout@v2

# setup the python environment for the operating system
- name: Set up Python ${{matrix.os}} ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}

- name: Create output suffix
run: |
echo "OUTPUT_SUFFIX=$(basename $TEST_FILE)" >> $GITHUB_ENV
# 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@v1
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: ${{ env.TEST_FILE }}
test_output_suffix: ${{ env.OUTPUT_SUFFIX }}

# Archive the results from the pytest to storage.
- name: Archive test results
uses: actions/upload-artifact@v2
if: always()
with:
name: pytest-report
# should match test-<test_output_suffix>- ...
path: output/test-${{ env.OUTPUT_SUFFIX }}-${{matrix.os}}-${{ matrix.python-version }}-results.xml
68 changes: 68 additions & 0 deletions .github/workflows/pytest-dbutils-influxdbfuncts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# This workflow is meant as a foundational workflow for running integration/unit tests on the
# platform.
# This workflow also shows the caching mechanisms available for storage
# and retrieval of cache for quicker setup of test environments.


name: Testing influxdbutils
on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- main
- develop
- releases/**

jobs:
build:
env:
TEST_FILE: volttrontesting/platform/dbutils/test_influxdbutils.py

# The strategy allows customization of the build and allows matrixing the version of os and software
# https://docs.github.com/en/[email protected]/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-18.04, ubuntu-20.04 ]
python-version: [ 3.6, 3.7] # , 3.8, 3.9 ]

runs-on: ${{ matrix.os }}

steps:
# checkout the volttron repository and set current directory to it
- uses: actions/checkout@v2

# 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@v2
with:
python-version: ${{ matrix.python-version }}

- name: Create output suffix
run: |
echo "OUTPUT_SUFFIX=$(basename $TEST_FILE)" >> $GITHUB_ENV
# 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@v1
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: ${{ env.TEST_FILE }}
test_output_suffix: ${{ env.OUTPUT_SUFFIX }}

# Archive the results from the pytest to storage.
- name: Archive test results
uses: actions/upload-artifact@v2
if: always()
with:
name: pytest-report
# should match test-<test_output_suffix>- ...
path: output/test-${{ env.OUTPUT_SUFFIX }}-${{matrix.os}}-${{ matrix.python-version }}-results.xml
68 changes: 68 additions & 0 deletions .github/workflows/pytest-dbutils-mysqlfuncts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# This workflow is meant as a foundational workflow for running integration/unit tests on the
# platform.
# This workflow also shows the caching mechanisms available for storage
# and retrieval of cache for quicker setup of test environments.


name: Testing mysqlfuncts
on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- main
- develop
- releases/**

jobs:
build:
env:
TEST_FILE: volttrontesting/platform/dbutils/test_mysqlfuncts.py

# The strategy allows customization of the build and allows matrixing the version of os and software
# https://docs.github.com/en/[email protected]/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-18.04, ubuntu-20.04 ]
python-version: [ 3.6, 3.7] # , 3.8, 3.9 ]

runs-on: ${{ matrix.os }}

steps:
# checkout the volttron repository and set current directory to it
- uses: actions/checkout@v2

# 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@v2
with:
python-version: ${{ matrix.python-version }}

- name: Create output suffix
run: |
echo "OUTPUT_SUFFIX=$(basename $TEST_FILE)" >> $GITHUB_ENV
# 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@v1
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: ${{ env.TEST_FILE }}
test_output_suffix: ${{ env.OUTPUT_SUFFIX }}

# Archive the results from the pytest to storage.
- name: Archive test results
uses: actions/upload-artifact@v2
if: always()
with:
name: pytest-report
# should match test-<test_output_suffix>- ...
path: output/test-${{ env.OUTPUT_SUFFIX }}-${{matrix.os}}-${{ matrix.python-version }}-results.xml
68 changes: 68 additions & 0 deletions .github/workflows/pytest-dbutils-postgresqlfuncts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
---
# This workflow is meant as a foundational workflow for running integration/unit tests on the
# platform.
# This workflow also shows the caching mechanisms available for storage
# and retrieval of cache for quicker setup of test environments.


name: Testing postgresqlfuncts
on:
push:
branches:
- develop
- releases/**
pull_request:
branches:
- main
- develop
- releases/**

jobs:
build:
env:
TEST_FILE: volttrontesting/platform/dbutils/test_postgresqlfuncts.py

# The strategy allows customization of the build and allows matrixing the version of os and software
# https://docs.github.com/en/[email protected]/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-18.04, ubuntu-20.04 ]
python-version: [ 3.6, 3.7] # , 3.8, 3.9 ]

runs-on: ${{ matrix.os }}

steps:
# checkout the volttron repository and set current directory to it
- uses: actions/checkout@v2

# 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@v2
with:
python-version: ${{ matrix.python-version }}

- name: Create output suffix
run: |
echo "OUTPUT_SUFFIX=$(basename $TEST_FILE)" >> $GITHUB_ENV
# 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@v1
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: ${{ env.TEST_FILE }}
test_output_suffix: ${{ env.OUTPUT_SUFFIX }}

# Archive the results from the pytest to storage.
- name: Archive test results
uses: actions/upload-artifact@v2
if: always()
with:
name: pytest-report
# should match test-<test_output_suffix>- ...
path: output/test-${{ env.OUTPUT_SUFFIX }}-${{matrix.os}}-${{ matrix.python-version }}-results.xml
Loading

0 comments on commit efe6ec9

Please sign in to comment.