Skip to content
This repository has been archived by the owner on May 8, 2024. It is now read-only.

U-SPS Regression Test for MCP Test #376

U-SPS Regression Test for MCP Test

U-SPS Regression Test for MCP Test #376

name: U-SPS Regression Test for MCP Test
on:
schedule:
# Runs around midnight Pacific Time (UTC-7)
# Doesn't account for daylight saving transitions
- cron: "0 7 * * *"
workflow_dispatch:
inputs:
PROCESS_SERVICE_ENDPOINT:
description: "Base URL for the WPS-T API endpoint (i.e. http://abc.def.ghi:port-number)"
type: string
SPS_API_SERVICE_ENDPOINT:
description: "Base URL for the SPS API endpoint (i.e. http://abc.def.ghi:port-number)"
type: string
JOBS_DATABASE_ENDPOINT:
description: "Base URL for the Jobs DB endpoint (i.e. http://abc.def.ghi:port-number)"
type: string
SOUNDER_SIPS_PROCESS_SELECTION:
description: "The Sounder SIPS process to test (L1A, L1B, chirp)"
default: ".*"
required: false
type: string
jobs:
print_inputs:
runs-on: ubuntu-latest
steps:
- run: |
echo "Base URL for the WPS-T API endpoint (i.e. http://abc.def.ghi:port-number): ${{ github.event.inputs.PROCESS_SERVICE_ENDPOINT || vars.MCP_TEST_PROCESS_SERVICE_ENDPOINT }}"
echo "Base URL for the SPS API endpoint (i.e. http://abc.def.ghi:port-number): ${{ github.event.inputs.SPS_API_SERVICE_ENDPOINT || vars.MCP_TEST_SPS_API_SERVICE_ENDPOINT }}"
echo "Base URL for the Jobs DB endpoint (i.e. http://abc.def.ghi:port-number): ${{ github.event.inputs.JOBS_DATABASE_ENDPOINT || vars.MCP_TEST_JOBS_DATABASE_ENDPOINT }}"
echo "The Sounder SIPS PGEs to test (L1A, L1B, chirp): ${{ github.event.inputs.SOUNDER_SIPS_PROCESS_SELECTION || vars.SOUNDER_SIPS_PROCESS_SELECTION }}"
regression_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Install dependencies
working-directory: ${{ github.workspace }}/unity-test
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt --use-pep517
- name: Run the regression test
working-directory: ${{ github.workspace }}/unity-test/step_defs
run: >
pytest -s
--process-service-endpoint=${{ github.event.inputs.PROCESS_SERVICE_ENDPOINT || vars.MCP_TEST_PROCESS_SERVICE_ENDPOINT }}
--sps-api-service-endpoint=${{ github.event.inputs.SPS_API_SERVICE_ENDPOINT || vars.MCP_TEST_SPS_API_SERVICE_ENDPOINT }}
--jobs-database-endpoint=${{ github.event.inputs.JOBS_DATABASE_ENDPOINT || vars.MCP_TEST_JOBS_DATABASE_ENDPOINT }}
--sounder-sips-process-selection=${{ github.event.inputs.SOUNDER_SIPS_PROCESS_SELECTION || vars.SOUNDER_SIPS_PROCESS_SELECTION }}
--environment "test"
-rs