forked from fury-gl/fury
-
Notifications
You must be signed in to change notification settings - Fork 0
129 lines (123 loc) · 3.85 KB
/
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: FURY Tests
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 2 * * Mon' # weekly
defaults:
run:
shell: bash
jobs:
build:
runs-on: ${{ matrix.os }}
timeout-minutes: 60
defaults:
run:
shell: bash
strategy:
fail-fast: false
matrix:
python-version: [3.9, '3.10', 3.11, 3.12]
os: [ubuntu-latest, macos-latest, windows-latest]
platform: [x64]
install-type: [pip, ] # conda]
depends: [DEFAULT_DEPS, OPTIONAL_DEPS]
coverage: [false]
use-pre: [false]
include:
- os: macos-latest # ubuntu-latest
python-version: 3.11
install-type: pip
depends: OPTIONAL_DEPS
coverage: true
use-pre: false
- os: ubuntu-latest
python-version: 3.12
install-type: pip
depends: OPTIONAL_DEPS
coverage: false
use-pre: true
env:
INSTALL_TYPE: ${{ matrix.install-type }}
DEPENDS: ${{ matrix.depends }}
PYTHON_VERSION: ${{ matrix.python-version }}
VENV_ARGS: "--python=python"
USE_PRE: ${{ matrix.use-pre }}
COVERAGE: ${{ matrix.coverage }}
PRE_WHEELS: "https://pypi.anaconda.org/scipy-wheels-nightly/simple"
# EAGER_IMPORT: 1 # to explore what is the issue.
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/cache@v4
if: startsWith(runner.os, 'Linux')
with:
path: |
~/.cache/pip
~/.ccache
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v4
if: startsWith(runner.os, 'macOS')
with:
path: ~/Library/Caches/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- uses: actions/cache@v4
if: startsWith(runner.os, 'Windows')
with:
path: ~/.pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Set up Virtualenv
if: ${{ matrix.install-type != 'conda' }}
run: |
python -m pip install --upgrade pip virtualenv
virtualenv $VENV_ARGS venv
- name: Setup Miniconda
uses: conda-incubator/setup-miniconda@v3
if: ${{ matrix.install-type == 'conda' }}
with:
auto-update-conda: true
auto-activate-base: false
activate-environment: venv
python-version: ${{ matrix.python-version }}
channels: defaults, conda-forge
use-only-tar-bz2: true
- name: Install Dependencies
run: ci/install_dependencies.sh
- name: Install FURY
run: ci/install.sh
- name: Setup Headless
run: ci/setup_headless.sh
- name: Run the tests!
run: |
if [ "${{ matrix.use-pre }}" == "true" ]; then
ci/run_tests.sh || echo "::warning::Experimental Job so failure ignored!"
else
ci/run_tests.sh
fi
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
if: ${{ matrix.coverage }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: for_testing
files: coverage.xml
fail_ci_if_error: true
env_vars: ${{ matrix.os }}, PYTHON_VERSION
flags: unittests
name: codecov-umbrella
verbose: true