-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #20 from sobomax/pr_split_jobs
Split tests into individual jobs.
- Loading branch information
Showing
6 changed files
with
85 additions
and
15 deletions.
There are no files selected for viewing
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
name: 'Publish Logs' | ||
description: 'Collect and upload logs for all scenarious' | ||
inputs: | ||
log_name: | ||
description: "Name of logs after upload" | ||
default: sipssert-logs | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Resolve logs path | ||
run: | | ||
cd tests | ||
echo "LOGS_PATH=$(readlink -f logs/latest)" >> $GITHUB_ENV | ||
shell: bash | ||
|
||
- name: Publish logs | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.log_name }} | ||
path: ${{ env.LOGS_PATH }} |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: 'Run Test' | ||
description: 'Runs specific test, resolves the logs path, and uploads the logs' | ||
inputs: | ||
scenario: | ||
description: "Name of scenario to run" | ||
required: true | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Run All Tests | ||
run: | | ||
cd tests | ||
SETS=${{ inputs.scenario }} sh -x ./run-all.sh | ||
shell: bash | ||
|
||
- name: Publish logs | ||
if: always() | ||
uses: ./sipssert/actions/Publish_Logs | ||
with: | ||
log_name: sipssert-${{ inputs.scenario }}-logs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name: 'Read Job Matrix' | ||
description: 'Read list of scenarious to run and output matrix.' | ||
inputs: {} | ||
outputs: | ||
matrix: | ||
description: "The job matrix" | ||
value: ${{ steps.set-matrix.outputs.matrix }} | ||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Read and parse YAML file | ||
id: set-matrix | ||
run: | | ||
echo "Reading YAML file to create matrix" | ||
MATRIX=$(python3 sipssert/actions/read_matrix.py tests/matrix.yml) | ||
echo "matrix=${MATRIX}" >> $GITHUB_OUTPUT | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
import sys, json, yaml | ||
|
||
print(json.dumps(yaml.safe_load(open(sys.argv[1])))) |