-
Notifications
You must be signed in to change notification settings - Fork 19
57 lines (53 loc) · 1.38 KB
/
pr_tests.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
name: PR Tests
on:
pull_request:
branches:
- master
jobs:
pre-commit:
name: Format
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: "3.x"
- uses: pre-commit/action@v3.0.1
with:
extra_args: --hook-stage manual --all-files
test:
name:
Run pytest (Python ${{ matrix.python-version }}, ROOT ${{
matrix.root-version }})
needs: pre-commit
runs-on: ubuntu-latest
strategy:
max-parallel: 4
fail-fast: true
matrix:
python-version: ["3.10"]
root-version: ["6.30.04", "6.32.10"]
include:
- python-version: "3.9"
root-version: "6.22.8"
steps:
- uses: actions/checkout@v1
- name: Set up Conda
uses: conda-incubator/setup-miniconda@v3
with:
python-version: ${{ matrix.python-version }}
miniforge-version: latest
- name: Install ROOT ${{ matrix.root-version }}
shell: bash -l {0}
run: |
mamba install -c conda-forge numpy scipy nomkl root==${{ matrix.root-version }}
- name: Install package
shell: bash -l {0}
run: |
pip install .[test]
- name: Test with pytest
shell: bash -l {0}
run: |
pytest tests