-
Notifications
You must be signed in to change notification settings - Fork 16
53 lines (51 loc) · 1.73 KB
/
Copy pathimports.yml
File metadata and controls
53 lines (51 loc) · 1.73 KB
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
42
43
44
45
46
47
48
49
50
51
52
53
name: Test imports
on:
pull_request:
push:
branches:
- main
jobs:
rngs:
runs-on: ubuntu-latest
outputs:
os: ${{ steps.os.outputs.selected }}
pyver: ${{ steps.pyver.outputs.selected }}
steps:
# Plain bash instead of a marketplace action; see the note on the rngs job in
# test_and_build.yml. To weight a choice, repeat it; to skip one, remove it.
- name: RNG for os
id: os
run: |
choices=(ubuntu-latest macos-latest windows-latest)
selected=${choices[$((RANDOM % ${#choices[@]}))]}
echo "selected: $selected (from: ${choices[*]})"
echo "selected=$selected" >> "$GITHUB_OUTPUT"
- name: RNG for Python version
id: pyver
run: |
choices=(3.11 3.12 3.13 3.14)
selected=${choices[$((RANDOM % ${#choices[@]}))]}
echo "selected: $selected (from: ${choices[*]})"
echo "selected=$selected" >> "$GITHUB_OUTPUT"
test_imports:
needs: rngs
runs-on: ${{ needs.rngs.outputs.os }}
# runs-on: ${{ matrix.os }}
# strategy:
# matrix:
# python-version: ["3.11", "3.12", "3.13", "3.14"]
# os: ["ubuntu-latest", "macos-latest", "windows-latest"]
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-python@v6
with:
python-version: ${{ needs.rngs.outputs.pyver }}
# python-version: ${{ matrix.python-version }}
- run: python -m pip install --upgrade pip
# - run: pip install --pre suitesparse-graphblas # Use if we need pre-release
- run: pip install -e .[default]
- name: Run test imports
run: ./scripts/test_imports.sh