|
| 1 | +name: "Integration test cleanup" |
| 2 | + |
| 3 | +on: |
| 4 | + schedule: |
| 5 | + # Run every Friday at 10:00 PM Eastern Time (3:00 AM UTC Saturday) |
| 6 | + - cron: '0 3 * * 6' |
| 7 | + workflow_dispatch: # Allow manual triggering |
| 8 | + |
| 9 | +jobs: |
| 10 | + cleanup: |
| 11 | + name: Delete resources |
| 12 | + runs-on: ubuntu-latest |
| 13 | + permissions: |
| 14 | + contents: read |
| 15 | + |
| 16 | + steps: |
| 17 | + - name: Checkout repository |
| 18 | + uses: actions/checkout@v4 |
| 19 | + |
| 20 | + - name: Set up Python |
| 21 | + uses: actions/setup-python@v4 |
| 22 | + with: |
| 23 | + python-version: '3.13' |
| 24 | + |
| 25 | + - name: get-dependencies-location |
| 26 | + shell: bash |
| 27 | + run: | |
| 28 | + SITE_PACKAGES_LOCATION=$(python -c "from sysconfig import get_path; print(get_path('purelib'))") |
| 29 | + SITE_BIN_DIR=$(python3 -c "import os; import platform; import sysconfig; pre = sysconfig.get_config_var('prefix'); bindir = os.path.join(pre, 'Scripts' if platform.system() == 'Windows' else 'bin'); print(bindir)") |
| 30 | + echo "site_packages_loc=$SITE_PACKAGES_LOCATION" >> $GITHUB_OUTPUT |
| 31 | + echo "site_bin_dir=$SITE_BIN_DIR" >> $GITHUB_OUTPUT |
| 32 | + id: get-dependencies |
| 33 | + |
| 34 | + - name: Cache py-dependencies |
| 35 | + id: cache-dependencies |
| 36 | + uses: actions/cache@v4 |
| 37 | + env: |
| 38 | + cache-name: cache-py-dependencies-cleanup |
| 39 | + with: |
| 40 | + path: | |
| 41 | + ${{ steps.get-dependencies.outputs.site_packages_loc }} |
| 42 | + ${{ steps.get-dependencies.outputs.site_bin_dir }} |
| 43 | + key: ${{ runner.os }}-3.13-build-${{ env.cache-name }}-${{ hashFiles('setup.py') }}-v1 |
| 44 | + |
| 45 | + - name: Install py-dependencies |
| 46 | + if: steps.cache-dependencies.outputs.cache-hit != 'true' |
| 47 | + shell: bash |
| 48 | + run: | |
| 49 | + python -m pip install --upgrade pip |
| 50 | +
|
| 51 | + pip install -e ".[boto3,pandas,pysftp,tests]" |
| 52 | +
|
| 53 | + # ensure that numpy c extensions are installed on windows |
| 54 | + # https://stackoverflow.com/a/59346525 |
| 55 | + if [ "${{startsWith(runner.os, 'Windows')}}" == "true" ]; then |
| 56 | + pip uninstall -y numpy |
| 57 | + pip uninstall -y setuptools |
| 58 | + pip install setuptools |
| 59 | + pip install numpy |
| 60 | + fi |
| 61 | +
|
| 62 | + - name: Set up Synapse credentials |
| 63 | + shell: bash |
| 64 | + run: | |
| 65 | + # decrypt the encrypted test synapse configuration |
| 66 | + openssl aes-256-cbc -K ${{ secrets.encrypted_d17283647768_key }} -iv ${{ secrets.encrypted_d17283647768_iv }} -in test.synapseConfig.enc -out test.synapseConfig -d |
| 67 | + mv test.synapseConfig ~/.synapseConfig |
| 68 | +
|
| 69 | + - name: Run evaluation deletion script |
| 70 | + run: | |
| 71 | + python .github/scripts/delete_evaluations.py |
| 72 | +
|
| 73 | + - name: Run project deletion script |
| 74 | + run: | |
| 75 | + python .github/scripts/delete_projects.py |
| 76 | +
|
| 77 | + - name: Run team deletion script |
| 78 | + run: | |
| 79 | + python .github/scripts/delete_teams.py |
| 80 | +
|
| 81 | + - name: Run empty trash script |
| 82 | + run: | |
| 83 | + python .github/scripts/empty_trash.py |
0 commit comments