-
Notifications
You must be signed in to change notification settings - Fork 215
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added pre and post test run compose action files
Signed-off-by: noopur <[email protected]>
- Loading branch information
1 parent
bd44b41
commit d19d655
Showing
9 changed files
with
214 additions
and
354 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
--- | ||
#--------------------------------------------------------------------------- | ||
# Composite Action to run post-test functions for task runner end to end tests | ||
# Includes: | ||
# - Print test summary | ||
# - Create tar file | ||
# - Upload artifacts | ||
# | ||
# Authors - Noopur, Payal Chaurasiya | ||
#--------------------------------------------------------------------------- | ||
name: 'Post-Test Functions' | ||
description: 'Run post-test functions' | ||
inputs: | ||
test_type: | ||
description: 'Test type' | ||
required: true | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Print test summary | ||
id: print_test_summary | ||
if: ${{ always() }} | ||
run: | | ||
export PYTHONPATH="$PYTHONPATH:." | ||
python tests/end_to_end/utils/summary_helper.py | ||
echo "Test summary printed" | ||
shell: bash | ||
|
||
- name: Create Tar (exclude cert and data folders) | ||
id: tar_files | ||
if: ${{ always() }} | ||
run: | | ||
tar -cvf result.tar --exclude="cert" --exclude="data" --exclude="__pycache__" $HOME/results | ||
shell: bash | ||
|
||
- name: Upload Artifacts | ||
id: upload_artifacts | ||
uses: actions/upload-artifact@v4 | ||
if: ${{ always() }} | ||
with: | ||
name: ${{ inputs.test_type }}_${{ env.MODEL_NAME }}_python${{ env.PYTHON_VERSION }}_${{ github.run_id }} | ||
path: result.tar |
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,39 @@ | ||
--- | ||
#--------------------------------------------------------------------------- | ||
# Composite Action to run pre-test functions for task runner end to end tests | ||
# Includes: | ||
# - Set up Python | ||
# - Install dependencies | ||
# | ||
# Authors - Noopur, Payal Chaurasiya | ||
#--------------------------------------------------------------------------- | ||
name: 'Pre-Test Functions' | ||
description: 'Run pre-test functions' | ||
|
||
runs: | ||
using: 'composite' | ||
steps: | ||
- name: Set up Python | ||
id: setup_python | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
|
||
- name: Install dependencies | ||
id: install_dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
pip install . | ||
pip install -r test-requirements.txt | ||
shell: bash | ||
|
||
- name: Create OpenFL image | ||
if: ${{ github.workflow == 'Task_Runner_E2E_via_Docker' }} | ||
id: create_openfl_image | ||
run: | | ||
echo "Creating openfl image with current repo and branch. This may take a few minutes..." | ||
cd openfl-docker | ||
docker build . -t openfl -f Dockerfile.base \ | ||
--build-arg OPENFL_REVISION=https://github.com/${{ github.repository }}.git@${{ github.ref_name }} | ||
echo "OpenFL image created successfully" | ||
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
Oops, something went wrong.