Skip to content

Commit

Permalink
Changes to github workflow and volttrontesting based on last successf…
Browse files Browse the repository at this point in the history
…ul github action PR
  • Loading branch information
schandrika committed Nov 10, 2023
1 parent ce5ff49 commit 1159b33
Show file tree
Hide file tree
Showing 15 changed files with 28 additions and 59 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/code_analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,6 @@ on:
schedule:
- cron: '25 18 * * 2'

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
analyze:
name: Analyze
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pytest-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ on:
- develop
- releases/**

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# The job named build
build:
Expand Down Expand Up @@ -60,7 +56,7 @@ jobs:

# 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
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/pytest-dbutils-backup_db.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@ on:
- develop
- releases/**

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
env:
Expand Down Expand Up @@ -65,7 +61,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pytest-dbutils-influxdbfuncts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -54,7 +51,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pytest-dbutils-mysqlfuncts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -54,7 +51,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/pytest-dbutils-postgresqlfuncts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
Expand Down Expand Up @@ -54,7 +51,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pytest-dbutils-sqlitefuncts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
env:
Expand Down Expand Up @@ -54,7 +52,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pytest-dbutils-timescaldbfuncts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
env:
Expand Down Expand Up @@ -53,7 +51,7 @@ jobs:
# 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
uses: volttron/volttron-build-action@v5
timeout-minutes: 600
with:
python_version: ${{ matrix.python-version }}
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/pytest-miscellaneous-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# The job named build
build:
Expand Down Expand Up @@ -57,39 +55,39 @@ jobs:

# Run the specified tests and save the results to a unique file that can be archived for later analysis
- name: Run certs test on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/web/test_certs.py
test_output_suffix: misc

- name: Run core agent test on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/test_core_agent.py
test_output_suffix: misc

- name: Run packaging test on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/test_packaging.py
test_output_suffix: misc

- name: Run platform init test on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
test_path: volttrontesting/platform/test_platform_init.py
test_output_suffix: misc

- name: Run sqlite3 test on ${{ matrix.python-version }}, ${{ matrix.os }}
uses: volttron/volttron-build-action@v6
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pytest-testutils.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
# The strategy allows customization of the build and allows matrixing the version of os and software
Expand All @@ -48,7 +46,7 @@ jobs:

# 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
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pytest-vctl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# The job named build
build:
Expand Down Expand Up @@ -59,7 +57,7 @@ jobs:

# 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
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/pytest-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ on:
- main
- develop
- releases/**
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# The job named build
build:
Expand Down Expand Up @@ -57,7 +55,7 @@ jobs:

# 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@v7
uses: volttron/volttron-build-action@v5
with:
python_version: ${{ matrix.python-version }}
os: ${{ matrix.os }}
Expand Down
8 changes: 5 additions & 3 deletions volttrontesting/fixtures/volttron_platform_fixtures.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ def build_wrapper(vip_address: str, should_start: bool = True, messagebus: str =
auth_enabled=kwargs.pop('auth_enabled', True))
if should_start:
wrapper.startup_platform(vip_address=vip_address, **kwargs)
if not wrapper.dynamic_agent:
raise ValueError(f"Couldn't start platform successfully for {wrapper.messagebus}")
if wrapper.messagebus == 'rmq':
gevent.sleep(5)
else:
gevent.sleep(2)
assert wrapper.is_running()
return wrapper

Expand Down Expand Up @@ -133,7 +135,7 @@ def volttron_instance(request, **kwargs):
"""
address = kwargs.pop("vip_address", get_rand_vip())
if request.param['messagebus'] == 'rmq':
kwargs['timeout'] = 240
kwargs['timeout'] = 120

wrapper = build_wrapper(address,
messagebus=request.param.get('messagebus', 'zmq'),
Expand Down
2 changes: 1 addition & 1 deletion volttrontesting/platform/dbutils/test_mysqlfuncts.py
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ def get_container_func(request):
create_all_tables(container, historian_version)

mysqlfuncts = get_mysqlfuncts(connection_port)
sleep(25)
sleep(5)
# So that sqlfuncts class can check if metadata is in topics table and sets its variables accordingly
mysqlfuncts.setup_historian_tables()
yield container, mysqlfuncts, connection_port, historian_version
Expand Down
2 changes: 1 addition & 1 deletion volttrontesting/utils/build_agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def build_agent(platform: PlatformWrapper, identity=None, agent_class=None):

os.environ['VOLTTRON_HOME'] = platform.volttron_home
agent = platform.build_agent(identity, agent_class=agent_class)
gevent.sleep(0.1) # switch context for a bit
gevent.sleep(0.1) # switch context for a bit
os.environ.pop('VOLTTRON_HOME')
return agent

Expand Down

0 comments on commit 1159b33

Please sign in to comment.