-
Notifications
You must be signed in to change notification settings - Fork 26
138 lines (122 loc) · 3.53 KB
/
installation_test.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
name: build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main", "dev" ]
workflow_dispatch:
inputs:
name:
description: 'description'
required: false
default: ''
permissions:
contents: read
jobs:
build:
name: ${{ matrix.platform }}, py${{ matrix.python-version }}, ${{ matrix.extra }}, ${{ matrix.install-level }}
runs-on: ${{ matrix.platform }}
strategy:
fail-fast: false
matrix:
platform: [
# ubuntu-latest,
# ubuntu-22.04,
ubuntu-20.04,
# # windows-latest,
windows-2022,
windows-2019,
# # macos-latest,
macos-12.0,
macos-11.0,
# macos-10.15,
]
python-version: [
"3.9",
# "3.10",
# "3.11",
# "3.12",
]
extra: [
"all",
]
install-level: [
system,
user,
]
steps:
- name: Set up conda
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: latest
activate-environment: sabatini-datajoint
auto-activate-base: true
auto-update-conda: true
remove-profiles: true
architecture: x64
clean-patched-environment-file: true
run-post: true
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Check out repository code
uses: actions/checkout@v3
- name: Prepare PowerShell
shell: pwsh
run: |
conda info
conda list
- name: Check specs of the machine -- Linux
if: startsWith(matrix.platform, 'ubuntu')
run: |
## check cpu, memory, disk, etc.
## print the command inputs to the workflow
echo "CPU info (lscpu):"
lscpu
echo "Memory info (free -h):"
free -h
echo "Disk info (df -h):"
df -h
echo "Network info (ip a):"
ip a
echo "OS info (uname -a):"
uname -a
- name: Check specs of the machine -- Windows
if: startsWith(matrix.platform, 'windows')
run: |
## check cpu, memory, disk, etc.
## just do a generic check on system info
## print the command inputs to the workflow
echo "System info (systeminfo):"
systeminfo
- name: Check specs of the machine -- MacOS
if: startsWith(matrix.platform, 'macos')
run: |
## check cpu, memory, disk, etc.
## print the command inputs to the workflow
echo "CPU info (sysctl -n machdep.cpu.brand_string):"
sysctl -n machdep.cpu.brand_string
echo "Memory info (sysctl -n hw.memsize):"
sysctl -n hw.memsize
echo "Disk info (df -h):"
df -h
echo "OS info (uname -a):"
uname -a
- name: Install sabatini-datajoint with pip dependencies -- system-level
if: matrix.install-level == 'system'
run: |
## install dependencies with optional extras
pip install -e .[${{ matrix.extra }}]
- name: Install sabatini-datajoint with pip dependencies -- user-level
if: matrix.install-level == 'user'
run: |
pip install -e .[${{ matrix.extra }}] --user
- name: Check installed packages
run: |
pip list
conda list
- name: Run pytest
run: |
pip install pytest
python -m pytest --capture=tee-sys