-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (73 loc) · 2.06 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main, reorg]
tags: ["*"]
pull_request:
workflow_dispatch:
jobs:
test:
name: Python ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: false
matrix:
version: ["3.9", "3.10", "3.11", "3.12"]
os: [ubuntu-latest]
arch: [x64]
experimental: [false]
#include:
# - version: "3.12-dev"
# os: ubuntu-latest
# arch: x64
# experimental: true
steps:
- uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.version }}
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Test
run: pytest
- name: Test notebooks
run: pytest --nbmake examples/*.ipynb --nbmake-kernel=python3
type-check:
name: Type Check
runs-on: ubuntu-latest
continue-on-error: true
steps:
- uses: actions/checkout@v3
- name: Install python
uses: actions/setup-python@v4
with:
python-version: 3.12
cache: 'pip'
cache-dependency-path: pyproject.toml
- name: Install dependencies
id: deps
run: |
python -m pip install --upgrade pip
pip install -e '.[dev]'
- name: Type check 3.10
if: ${{ steps.deps.outcome == 'success' && success() || failure() }}
uses: jakebailey/pyright-action@v1
with:
python-version: "3.10"
- name: Type check 3.12
if: ${{ steps.deps.outcome == 'success' && success() || failure() }}
uses: jakebailey/pyright-action@v1
with:
python-version: "3.12"
success:
name: Success
runs-on: ubuntu-latest
needs: [test, type-check]
steps:
- run: exit 0