Merge pull request #3083 from kefeimo/dnp3-agent-pr #649
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
# 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/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 ] | |
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@v4 | |
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 |