From 6c1e51b319d37915c4719dc1ce87dfb4d4590e5d Mon Sep 17 00:00:00 2001 From: Razvan Crainea Date: Fri, 30 Aug 2024 18:10:36 +0300 Subject: [PATCH] migrage github to new run.yml --- .github/workflows/run-tests.yml | 2 -- actions/Run_Test/action.yml | 11 ++++++----- actions/Set_Matrix/action.yml | 2 +- actions/read_matrix.py | 4 ++-- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 5f417fb..e495baf 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -39,5 +39,3 @@ jobs: - name: Run Test uses: ./sipssert/actions/Run_Test - with: - test_set: ${{ matrix.test_set }} diff --git a/actions/Run_Test/action.yml b/actions/Run_Test/action.yml index 077e857..b5fba51 100644 --- a/actions/Run_Test/action.yml +++ b/actions/Run_Test/action.yml @@ -1,20 +1,21 @@ name: 'Run Test' description: 'Runs specific test, resolves the logs path, and uploads the logs' inputs: - test_set: - description: "Name of the Test Set to run" - required: true + config: + description: "run.yml file" + required: false + default: run.yml runs: using: 'composite' steps: - name: Run All Tests run: | cd tests - SETS=${{ inputs.test_set }} sh -x ./run-all.sh + sipssert -c run.yml ${{ inputs.tests }} shell: bash - name: Publish logs if: always() uses: ./sipssert/actions/Publish_Logs with: - log_name: sipssert-${{ inputs.test_set }}-logs + log_name: sipssert-${{ inputs.tests }}-logs diff --git a/actions/Set_Matrix/action.yml b/actions/Set_Matrix/action.yml index 5d83dad..21d8e7c 100644 --- a/actions/Set_Matrix/action.yml +++ b/actions/Set_Matrix/action.yml @@ -12,6 +12,6 @@ runs: id: set-matrix run: | echo "Reading YAML file to create matrix" - MATRIX=$(python3 sipssert/actions/read_matrix.py tests/environment.yml) + MATRIX=$(python3 sipssert/actions/read_matrix.py tests/run.yml) echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT shell: bash diff --git a/actions/read_matrix.py b/actions/read_matrix.py index b00676a..f32df7b 100644 --- a/actions/read_matrix.py +++ b/actions/read_matrix.py @@ -1,9 +1,9 @@ -"""Filters the OS and tests_set from the matrix file""" +"""Filters the OS and tests from the matrix file""" import sys import json import yaml -matrix_keys = [ "os", "test_set" ] +matrix_keys = [ "os", "tests" ] matrix_dict = yaml.safe_load(open(sys.argv[1], encoding="utf-8"))