-
Notifications
You must be signed in to change notification settings - Fork 7
83 lines (72 loc) · 1.93 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
name: test
on:
push:
branches:
- main
- dev
paths-ignore:
- 'README.md'
- 'pyproject.toml'
- 'docs/**'
- 'tutorials/**'
- '.github/workflows/**'
pull_request:
branches:
- main
- dev
paths-ignore:
- 'README.md'
- 'pyproject.toml'
- 'docs/**'
- 'tutorials/**'
- '.github/workflows/**'
workflow_dispatch:
workflow_call:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 12
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Setup Conda for Ubuntu and Mac
if: matrix.os != 'windows-latest'
uses: conda-incubator/setup-miniconda@v2
with:
miniconda-version: "latest"
auto-update-conda: true
python-version: ${{ matrix.python-version }}
- name: Setup Conda for Windows
if: matrix.os == 'windows-latest'
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: anaconda, conda-forge
- name: Update conda and add channels
run: |
conda config --add channels conda-forge
conda update -n base -c defaults conda
conda update --all
- name: check python and conda version
run: |
conda --version
conda config --show channels
which python
python --version
- name: Install dependencies
run: |
conda install -c conda-forge rust
python -m pip install --upgrade pip
pip install pytest
pip install -e .
- name: Test with pytest
run: pytest