Skip to content

Commit

Permalink
Feature #1863 fix GitHub Actions warnings (#1864)
Browse files Browse the repository at this point in the history
  • Loading branch information
georgemccabe authored Oct 13, 2022
1 parent d7c117f commit 4427703
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 27 deletions.
6 changes: 3 additions & 3 deletions .github/jobs/get_use_cases_to_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,9 @@ echo Array of groups to run is: $matrix
# if matrix is still empty, exit 1 to fail step and skip rest of workflow
if [ "$matrix" == "[]" ]; then
echo No tests to run!
echo ::set-output name=run_some_tests::false
echo "run_some_tests=false" >> $GITHUB_OUTPUT
exit 0
fi

echo ::set-output name=run_some_tests::true
echo ::set-output name=matrix::{\"categories\":$(echo $matrix)}\"
echo "run_some_tests=true" >> $GITHUB_OUTPUT
echo "matrix={\"categories\":$(echo $matrix)}\"" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions .github/jobs/run_difference_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ artifact_name=$2
.github/jobs/setup_and_run_diff.py ${matrix_categories} $artifact_name

if [ "$( ls -A ${RUNNER_WORKSPACE}/diff)" ]; then
echo ::set-output name=upload_diff::true
echo "upload_diff=true" >> $GITHUB_OUTPUT
mkdir -p artifact/diff-${artifact_name}
cp -r ${RUNNER_WORKSPACE}/diff/* artifact/diff-${artifact_name}
exit 2
fi

echo ::set-output name=upload_diff::false
echo "upload_diff=false" >> $GITHUB_OUTPUT
4 changes: 2 additions & 2 deletions .github/jobs/save_error_logs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

.github/jobs/copy_error_logs.py ${RUNNER_WORKSPACE}/output artifact/error_logs
if [ -d "artifact/error_logs" ]; then
echo ::set-output name=upload_error_logs::true
echo "upload_error_logs=true" >> $GITHUB_OUTPUT
else
echo ::set-output name=upload_error_logs::false
echo "upload_error_logs=false" >> $GITHUB_OUTPUT
fi
12 changes: 6 additions & 6 deletions .github/jobs/set_job_controls.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,16 +83,16 @@ else
fi
fi

echo ::set-output name=run_get_image::$run_get_image
echo ::set-output name=run_get_input_data::$run_get_input_data
echo ::set-output name=run_diff::$run_diff
echo ::set-output name=run_save_truth_data::$run_save_truth_data
echo ::set-output name=external_trigger::$external_trigger
echo "run_get_image=$run_get_image" >> $GITHUB_OUTPUT
echo "run_get_input_data=$run_get_input_data" >> $GITHUB_OUTPUT
echo "run_diff=$run_diff" >> $GITHUB_OUTPUT
echo "run_save_truth_data=$run_save_truth_data" >> $GITHUB_OUTPUT
echo "external_trigger=$external_trigger" >> $GITHUB_OUTPUT

# get branch name
branch_name=`${GITHUB_WORKSPACE}/.github/jobs/print_branch_name.py`

echo ::set-output name=branch_name::$branch_name
echo "branch_name=$branch_name" >> $GITHUB_OUTPUT

# get use cases to run
.github/jobs/get_use_cases_to_run.sh $run_use_cases $run_all_use_cases $run_unit_tests
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ jobs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.6'
- name: Install dependencies
Expand All @@ -26,12 +26,12 @@ jobs:
python -m pip install python-dateutil requests Pillow
- name: Build Documentation
run: ./.github/jobs/build_documentation.sh
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: always()
with:
name: METplus_documentation
path: artifact/documentation
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v3
if: failure()
with:
name: documentation_warnings.log
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set job controls
id: job_status
run: .github/jobs/set_job_controls.sh
Expand All @@ -75,8 +75,8 @@ jobs:
needs: job_control
if: ${{ needs.job_control.outputs.run_get_image == 'true' }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.6'
- name: Get METplus Image
Expand Down Expand Up @@ -115,7 +115,7 @@ jobs:
matrix: ${{fromJson(needs.job_control.outputs.matrix)}}
steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v3

- name: Free disk space
run: .github/jobs/free_disk_space.sh
Expand All @@ -130,7 +130,7 @@ jobs:
id: get-artifact-name
run: |
artifact_name=`.github/jobs/get_artifact_name.sh ${{ matrix.categories }}`
echo ::set-output name=artifact_name::${artifact_name}
echo "artifact_name=${artifact_name}" >> $GITHUB_OUTPUT
# run use case tests
- name: Run Use Cases
Expand Down Expand Up @@ -158,22 +158,22 @@ jobs:
run: .github/jobs/copy_output_to_artifact.sh ${{ steps.get-artifact-name.outputs.artifact_name }}

- name: Upload output data artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() && steps.run_tests.conclusion != 'skipped' && !startsWith(matrix.categories,'pytests') }}
with:
name: ${{ steps.get-artifact-name.outputs.artifact_name }}
path: artifact/${{ steps.get-artifact-name.outputs.artifact_name }}

- name: Upload error logs artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() && steps.save-errors.outputs.upload_error_logs }}
with:
name: error_logs
path: artifact/error_logs
if-no-files-found: ignore

- name: Upload difference data artifact
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: ${{ always() && steps.run-diff.outputs.upload_diff == 'true' }}
with:
name: diff-${{ steps.get-artifact-name.outputs.artifact_name }}
Expand All @@ -186,8 +186,8 @@ jobs:
needs: [use_case_tests]
if: ${{ needs.job_control.outputs.run_save_truth_data == 'true' }}
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v2
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- run: .github/jobs/create_output_data_volumes.sh
env:
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
Expand Down

0 comments on commit 4427703

Please sign in to comment.