forked from mosdef-hub/msibi
-
Notifications
You must be signed in to change notification settings - Fork 1
111 lines (93 loc) · 3.07 KB
/
CI.yaml
File metadata and controls
111 lines (93 loc) · 3.07 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
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
name: CI
on:
push:
branches:
- "main"
pull_request:
branches:
- "main"
schedule:
- cron: "0 0 * * *"
jobs:
test:
if: github.event.pull_request.draft == false
name: MSIBI Tests (python)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.10", "3.11", "3.12"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v5
name: Checkout Branch / Pull Request
- name: Install Mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install Package
run: python -m build && pip install dist/*.whl
- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
run: python -m pytest -v --cov=msibi --cov-report=xml --cov-append --cov-config=setup.cfg --color yes --pyargs msibi
- name: Upload Coverage Report
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
name: MSIBI-Coverage
verbose: true
arch-test:
if: github.event.pull_request.draft == false
name: MSIBI Tests (arch)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [macOS-latest, ubuntu-latest]
python-version: ["3.13"]
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v5
name: Checkout Branch / Pull Request
- name: Install Mamba
uses: mamba-org/setup-micromamba@v2
with:
environment-file: environment-dev.yml
create-args: >-
python=${{ matrix.python-version }}
- name: Install Package
run: python -m build && pip install dist/*.whl
- name: Test (OS -> ${{ matrix.os }} / Python -> ${{ matrix.python-version }})
run: python -m pytest -v --color yes --pyargs msibi
wsl-test:
if: github.event.pull_request.draft == false
name: MSIBI Tests (WSL)
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
name: Checkout Branch / Pull Request
- uses: Vampire/setup-wsl@v5
with:
distribution: Ubuntu-24.04
wsl-shell-user: runner
name: Set up WSL
- name: Install MSIBI and run pytest
shell: wsl-bash {0}
run: |
wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh -O $HOME/Miniforge3.sh
bash $HOME/Miniforge3.sh -b -p $HOME/miniforge
echo 'export PATH=$HOME/miniforge/bin:$PATH' >> ~/.bashrc
export PATH=$HOME/miniforge/bin:$PATH
source ~/.bashrc
source $HOME/miniforge/etc/profile.d/conda.sh
mamba update -n base --all -y
mamba env create -f environment-dev.yml python=3.12 -y
conda activate msibi-dev
pip install -e . --prefix=$HOME/tmp_egginfo --no-build-isolation
python -m pytest -v --color yes