Skip to content

[v8.0] fix (StompMQConnector): add a timeout for the StompConnector #11856

[v8.0] fix (StompMQConnector): add a timeout for the StompConnector

[v8.0] fix (StompMQConnector): add a timeout for the StompConnector #11856

Workflow file for this run

name: pilot wrapper
on: [push, pull_request]
jobs:
PilotWrapper:
runs-on: ubuntu-latest
if: github.event_name != 'push' || github.repository == 'DIRACGrid/DIRAC'
strategy:
fail-fast: False
matrix:
python:
- 2.7.5
- 2.7.13
- 3.6.8
- 3.11.4
pilot_branch:
- master
- devel
steps:
- uses: actions/checkout@v4
- uses: cvmfs-contrib/github-action-cvmfs@v3
- name: Test CernVM-FS
run: ls /cvmfs/dirac.egi.eu
- name: Fail-fast for outdated pipelines
run: .github/workflows/fail-fast.sh
- name: prepare environment
run: |
conda config --set add_pip_as_python_dependency false
conda create -c conda-forge -c free -n python_${{ matrix.python }} python=${{ matrix.python }}
- name: run pilot wrapper test
run: |
cp tests/Integration/WorkloadManagementSystem/Test_GenerateAndExecutePilotWrapper.py .
eval "$(conda shell.bash hook)" && conda activate python_${{ matrix.python }}
# use github APIs to get the artifacts URLS from https://github.com/DIRACGrid/Pilot/, for those named Pilot_${{ matrix.pilot_branch }}
url=$(curl -s https://api.github.com/repos/DIRACGrid/Pilot/actions/artifacts | jq -r '.artifacts[] | select(.name == "Pilot_${{ matrix.pilot_branch }}") | .archive_download_url')
echo $url
# download and unzip the url above
curl -L \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
$url --output Pilot_${{ matrix.pilot_branch }}.zip
file_type=$(file --mime-type -b Pilot_${{ matrix.pilot_branch }}.zip)
if [ "$file_type" != "application/zip" ]; then
echo "The downloaded file is not a ZIP file. File type: $file_type"
exit 1
fi
mkdir -p ${{ matrix.pilot_branch }}/pilot
cp Pilot_${{ matrix.pilot_branch }}.zip ${{ matrix.pilot_branch }}/pilot
cd ${{ matrix.pilot_branch }}/pilot
unzip Pilot_${{ matrix.pilot_branch }}.zip
cd ../..
python Test_GenerateAndExecutePilotWrapper.py file://${{ github.workspace }}/src/DIRAC/WorkloadManagementSystem/Utilities/PilotWrapper.py file://${{ github.workspace }}/${{ matrix.pilot_branch }}