|
| 1 | +name: GlobusComputeExecutor tests |
| 2 | + |
| 3 | +on: |
| 4 | + pull_request: |
| 5 | + types: |
| 6 | + - opened |
| 7 | + - synchronize |
| 8 | + |
| 9 | + workflow_dispatch: |
| 10 | + inputs: |
| 11 | + tags: |
| 12 | + description: 'Test scenario tags' |
| 13 | + required: false |
| 14 | + type: boolean |
| 15 | + |
| 16 | +jobs: |
| 17 | + main-test-suite: |
| 18 | + strategy: |
| 19 | + matrix: |
| 20 | + python-version: ["3.11"] |
| 21 | + runs-on: ubuntu-20.04 |
| 22 | + timeout-minutes: 60 |
| 23 | + |
| 24 | + steps: |
| 25 | + - uses: actions/checkout@master |
| 26 | + |
| 27 | + - name: Set up Python ${{ matrix.python-version }} |
| 28 | + uses: actions/setup-python@v4 |
| 29 | + with: |
| 30 | + python-version: ${{ matrix.python-version }} |
| 31 | + |
| 32 | + - name: Collect Job Information |
| 33 | + id: job-info |
| 34 | + run: | |
| 35 | + echo "Python Version: ${{ matrix.python-version }}" >> ci_job_info.txt |
| 36 | + echo "CI Triggering Event: ${{ github.event_name }}" >> ci_job_info.txt |
| 37 | + echo "Triggering Git Ref: ${{ github.ref }}" >> ci_job_info.txt |
| 38 | + echo "Triggering Git SHA: ${{ github.sha }}" >> ci_job_info.txt |
| 39 | + echo "Workflow Run: ${{ github.run_number }}" >> ci_job_info.txt |
| 40 | + echo "Workflow Attempt: ${{ github.run_attempt }}" >> ci_job_info.txt |
| 41 | + as_ascii="$(echo "${{ github.ref_name }}" | perl -pe "s/[^A-z0-9-]+/-/g; s/^-+|-+\$//g; s/--+/-/g;")" |
| 42 | + echo "as-ascii=$as_ascii" >> $GITHUB_OUTPUT |
| 43 | +
|
| 44 | + - name: Non-requirements based install |
| 45 | + run: | |
| 46 | + # libpython3.5: make workqueue binary installer happy |
| 47 | + # mpich: required by radical executor |
| 48 | + sudo apt-get update -q |
| 49 | + sudo apt-get install -qy libpython3.5 mpich |
| 50 | +
|
| 51 | + - name: setup virtual env |
| 52 | + run: | |
| 53 | + make virtualenv |
| 54 | + source .venv/bin/activate |
| 55 | +
|
| 56 | + - name: make deps clean_coverage |
| 57 | + run: | |
| 58 | + source .venv/bin/activate |
| 59 | + make deps |
| 60 | + make clean_coverage |
| 61 | + |
| 62 | + # Temporary fix, until changes make it into compute releases |
| 63 | + git clone -b configure_tasks_working_dir https://github.com/globus/globus-compute.git |
| 64 | + pip3 install globus-compute/compute_sdk globus-compute/compute_endpoint |
| 65 | +
|
| 66 | + - name: start globus_compute_endpoint |
| 67 | + env: |
| 68 | + GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} |
| 69 | + GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} |
| 70 | + run: | |
| 71 | + source /home/runner/work/parsl/parsl/.venv/bin/activate |
| 72 | + globus-compute-endpoint configure default |
| 73 | + which globus-compute-endpoint |
| 74 | + python3 -c "import globus_compute_sdk; print(globus_compute_sdk.__version__)" |
| 75 | + python3 -c "import globus_compute_endpoint; print(globus_compute_endpoint.__version__)" |
| 76 | + cat << EOF > /home/runner/.globus_compute/default/config.yaml |
| 77 | + engine: |
| 78 | + type: ThreadPoolEngine |
| 79 | + max_workers: 4 |
| 80 | + working_dir: /home/runner/.globus_compute/default/tasks_working_dir |
| 81 | + EOF |
| 82 | + cat /home/runner/.globus_compute/default/config.yaml |
| 83 | + mkdir ~/.globus_compute/default/tasks_working_dir |
| 84 | + globus-compute-endpoint start default |
| 85 | + globus-compute-endpoint list |
| 86 | + - name: make test |
| 87 | + env: |
| 88 | + GLOBUS_COMPUTE_CLIENT_ID: ${{ secrets.GLOBUS_COMPUTE_CLIENT_ID }} |
| 89 | + GLOBUS_COMPUTE_CLIENT_SECRET: ${{ secrets.GLOBUS_COMPUTE_SECRET_KEY }} |
| 90 | + run: | |
| 91 | + source .venv/bin/activate |
| 92 | + export GLOBUS_COMPUTE_ENDPOINT=$(globus-compute-endpoint list | grep default | cut -c 3-38) |
| 93 | + echo "GLOBUS_COMPUTE_ENDPOINT = $GLOBUS_COMPUTE_ENDPOINT" |
| 94 | +
|
| 95 | + # temporary; until test-matrixification |
| 96 | + export PARSL_TEST_PRESERVE_NUM_RUNS=7 |
| 97 | +
|
| 98 | + make gce_test |
| 99 | + ln -s .pytest/parsltest-current test_runinfo |
| 100 | +
|
| 101 | + - name: Archive runinfo logs |
| 102 | + if: ${{ always() }} |
| 103 | + uses: actions/upload-artifact@v4 |
| 104 | + with: |
| 105 | + name: runinfo-${{ matrix.python-version }}-${{ steps.job-info.outputs.as-ascii }}-${{ github.sha }} |
| 106 | + path: | |
| 107 | + runinfo/ |
| 108 | + .pytest/ |
| 109 | + ci_job_info.txt |
| 110 | + compression-level: 9 |
0 commit comments