-
Notifications
You must be signed in to change notification settings - Fork 21
41 lines (39 loc) · 1.54 KB
/
long_workflow.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
name: ASPIRE Python Long Running Test Suite
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
expensive_tests:
runs-on: self-hosted
# Only run on review ready pull_requests
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
timeout-minutes: 360
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
- name: Customize config
run: |
echo "Setup tmp dirs and chmod so others can cleanup."
CI_TMP_DIR=/var/ci/tmp
mkdir -p ${CI_TMP_DIR}
chmod g+rwx ${CI_TMP_DIR}
echo "Create and assign a unique temp dir to hold our config."
WORK_DIR=$(mktemp -d -p "${CI_TMP_DIR}")
echo "WORK_DIR=${WORK_DIR}"
echo "Stash the WORK_DIR to GitHub env so we can clean it up later."
echo "WORK_DIR=${WORK_DIR}" >> $GITHUB_ENV
echo -e "ray:\n temp_dir: ${WORK_DIR}\n" > ${WORK_DIR}/config.yaml
echo -e "nufft:\n backends: [finufft, pynfft]\n" >> ${WORK_DIR}/config.yaml
echo "Log the config: ${WORK_DIR}/config.yaml"
cat ${WORK_DIR}/config.yaml
- name: Run
run: |
export OMP_NUM_THREADS=1
ASPIREDIR=${{ env.WORK_DIR }} python -c \
"import aspire; print(aspire.config['ray']['temp_dir'])"
ASPIREDIR=${{ env.WORK_DIR }} python -m pytest -n8 -m "expensive" --durations=0
- name: Cleanup
run: rm -rf ${{ env.WORK_DIR }}