-
-
Notifications
You must be signed in to change notification settings - Fork 8
67 lines (59 loc) · 2.68 KB
/
testing_daily.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
name: Daily Testing
on:
schedule:
# https://crontab.guru. Run everyday at 0:00AM UTC, i.e. 08:00AM Beijing, i.e. 08:00PM Montreal (summer time)
- cron: "0 0 * * *"
jobs:
daily-testing:
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash {0}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
python-version: ["3.7", "3.10"]
torch-version: ["1.13.1"]
steps:
- name: Check out the repo code
uses: actions/checkout@v3
- name: Determine the Python version
uses: haya14busa/action-cond@v1
id: condval
with:
cond: ${{ matrix.python-version == 3.7 && matrix.os == 'macOS-latest' }}
# Note: the latest 3.7 subversion 3.7.17 for MacOS has "ModuleNotFoundError: No module named '_bz2'"
if_true: "3.7.16"
if_false: ${{ matrix.python-version }}
- uses: actions/setup-python@v4
with:
python-version: ${{ steps.condval.outputs.value }}
check-latest: true
cache: pip
cache-dependency-path: |
requirements.txt
- name: Install PyTorch ${{ matrix.torch-version }}+cpu
# we have to install torch in advance because torch_sparse needs it for compilation,
# refer to https://github.com/rusty1s/pytorch_sparse/issues/156#issuecomment-1304869772 for details
run: |
which python
which pip
python -m pip install --upgrade pip
pip install torch==${{ matrix.torch-version }} -f https://download.pytorch.org/whl/cpu
python -c "import torch; print('PyTorch:', torch.__version__)"
- name: Install other dependencies
run: |
pip install https://github.com/WenjieDu/PyPOTS/archive/main.zip
pip install torch-geometric torch-scatter torch-sparse -f "https://data.pyg.org/whl/torch-${{ matrix.torch-version }}+cpu.html"
pip install jupyterlab
- name: Fetch the test environment details
run: |
which python
pip list
- name: Test all notebook files
run: |
ipython -c "%run PyPOTS_Imputation.ipynb"
ipython -c "%run PyPOTS_Classification.ipynb"
ipython -c "%run PyPOTS_Clustering.ipynb"
ipython -c "%run PyPOTS_Forecasting.ipynb"